1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 2; RUN: llc -mtriple=riscv32 -mattr=+d,+experimental-zfh,+experimental-v -target-abi=ilp32d \ 3; RUN: -verify-machineinstrs < %s | FileCheck %s 4; RUN: llc -mtriple=riscv64 -mattr=+d,+experimental-zfh,+experimental-v -target-abi=lp64d \ 5; RUN: -verify-machineinstrs < %s | FileCheck %s 6 7declare <vscale x 1 x half> @llvm.vp.fdiv.nxv1f16(<vscale x 1 x half>, <vscale x 1 x half>, <vscale x 1 x i1>, i32) 8 9define <vscale x 1 x half> @vfdiv_vv_nxv1f16(<vscale x 1 x half> %va, <vscale x 1 x half> %b, <vscale x 1 x i1> %m, i32 zeroext %evl) { 10; CHECK-LABEL: vfdiv_vv_nxv1f16: 11; CHECK: # %bb.0: 12; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, mu 13; CHECK-NEXT: vfdiv.vv v8, v8, v9, v0.t 14; CHECK-NEXT: ret 15 %v = call <vscale x 1 x half> @llvm.vp.fdiv.nxv1f16(<vscale x 1 x half> %va, <vscale x 1 x half> %b, <vscale x 1 x i1> %m, i32 %evl) 16 ret <vscale x 1 x half> %v 17} 18 19define <vscale x 1 x half> @vfdiv_vv_nxv1f16_unmasked(<vscale x 1 x half> %va, <vscale x 1 x half> %b, i32 zeroext %evl) { 20; CHECK-LABEL: vfdiv_vv_nxv1f16_unmasked: 21; CHECK: # %bb.0: 22; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, mu 23; CHECK-NEXT: vfdiv.vv v8, v8, v9 24; CHECK-NEXT: ret 25 %head = insertelement <vscale x 1 x i1> undef, i1 true, i32 0 26 %m = shufflevector <vscale x 1 x i1> %head, <vscale x 1 x i1> undef, <vscale x 1 x i32> zeroinitializer 27 %v = call <vscale x 1 x half> @llvm.vp.fdiv.nxv1f16(<vscale x 1 x half> %va, <vscale x 1 x half> %b, <vscale x 1 x i1> %m, i32 %evl) 28 ret <vscale x 1 x half> %v 29} 30 31define <vscale x 1 x half> @vfdiv_vf_nxv1f16(<vscale x 1 x half> %va, half %b, <vscale x 1 x i1> %m, i32 zeroext %evl) { 32; CHECK-LABEL: vfdiv_vf_nxv1f16: 33; CHECK: # %bb.0: 34; CHECK-NEXT: vsetvli a1, zero, e16, mf4, ta, mu 35; CHECK-NEXT: vfmv.v.f v25, fa0 36; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, mu 37; CHECK-NEXT: vfdiv.vv v8, v8, v25, v0.t 38; CHECK-NEXT: ret 39 %elt.head = insertelement <vscale x 1 x half> undef, half %b, i32 0 40 %vb = shufflevector <vscale x 1 x half> %elt.head, <vscale x 1 x half> undef, <vscale x 1 x i32> zeroinitializer 41 %v = call <vscale x 1 x half> @llvm.vp.fdiv.nxv1f16(<vscale x 1 x half> %va, <vscale x 1 x half> %vb, <vscale x 1 x i1> %m, i32 %evl) 42 ret <vscale x 1 x half> %v 43} 44 45define <vscale x 1 x half> @vfdiv_vf_nxv1f16_unmasked(<vscale x 1 x half> %va, half %b, i32 zeroext %evl) { 46; CHECK-LABEL: vfdiv_vf_nxv1f16_unmasked: 47; CHECK: # %bb.0: 48; CHECK-NEXT: vsetvli a1, zero, e16, mf4, ta, mu 49; CHECK-NEXT: vfmv.v.f v25, fa0 50; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, mu 51; CHECK-NEXT: vfdiv.vv v8, v8, v25 52; CHECK-NEXT: ret 53 %elt.head = insertelement <vscale x 1 x half> undef, half %b, i32 0 54 %vb = shufflevector <vscale x 1 x half> %elt.head, <vscale x 1 x half> undef, <vscale x 1 x i32> zeroinitializer 55 %head = insertelement <vscale x 1 x i1> undef, i1 true, i32 0 56 %m = shufflevector <vscale x 1 x i1> %head, <vscale x 1 x i1> undef, <vscale x 1 x i32> zeroinitializer 57 %v = call <vscale x 1 x half> @llvm.vp.fdiv.nxv1f16(<vscale x 1 x half> %va, <vscale x 1 x half> %vb, <vscale x 1 x i1> %m, i32 %evl) 58 ret <vscale x 1 x half> %v 59} 60 61declare <vscale x 2 x half> @llvm.vp.fdiv.nxv2f16(<vscale x 2 x half>, <vscale x 2 x half>, <vscale x 2 x i1>, i32) 62 63define <vscale x 2 x half> @vfdiv_vv_nxv2f16(<vscale x 2 x half> %va, <vscale x 2 x half> %b, <vscale x 2 x i1> %m, i32 zeroext %evl) { 64; CHECK-LABEL: vfdiv_vv_nxv2f16: 65; CHECK: # %bb.0: 66; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, mu 67; CHECK-NEXT: vfdiv.vv v8, v8, v9, v0.t 68; CHECK-NEXT: ret 69 %v = call <vscale x 2 x half> @llvm.vp.fdiv.nxv2f16(<vscale x 2 x half> %va, <vscale x 2 x half> %b, <vscale x 2 x i1> %m, i32 %evl) 70 ret <vscale x 2 x half> %v 71} 72 73define <vscale x 2 x half> @vfdiv_vv_nxv2f16_unmasked(<vscale x 2 x half> %va, <vscale x 2 x half> %b, i32 zeroext %evl) { 74; CHECK-LABEL: vfdiv_vv_nxv2f16_unmasked: 75; CHECK: # %bb.0: 76; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, mu 77; CHECK-NEXT: vfdiv.vv v8, v8, v9 78; CHECK-NEXT: ret 79 %head = insertelement <vscale x 2 x i1> undef, i1 true, i32 0 80 %m = shufflevector <vscale x 2 x i1> %head, <vscale x 2 x i1> undef, <vscale x 2 x i32> zeroinitializer 81 %v = call <vscale x 2 x half> @llvm.vp.fdiv.nxv2f16(<vscale x 2 x half> %va, <vscale x 2 x half> %b, <vscale x 2 x i1> %m, i32 %evl) 82 ret <vscale x 2 x half> %v 83} 84 85define <vscale x 2 x half> @vfdiv_vf_nxv2f16(<vscale x 2 x half> %va, half %b, <vscale x 2 x i1> %m, i32 zeroext %evl) { 86; CHECK-LABEL: vfdiv_vf_nxv2f16: 87; CHECK: # %bb.0: 88; CHECK-NEXT: vsetvli a1, zero, e16, mf2, ta, mu 89; CHECK-NEXT: vfmv.v.f v25, fa0 90; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, mu 91; CHECK-NEXT: vfdiv.vv v8, v8, v25, v0.t 92; CHECK-NEXT: ret 93 %elt.head = insertelement <vscale x 2 x half> undef, half %b, i32 0 94 %vb = shufflevector <vscale x 2 x half> %elt.head, <vscale x 2 x half> undef, <vscale x 2 x i32> zeroinitializer 95 %v = call <vscale x 2 x half> @llvm.vp.fdiv.nxv2f16(<vscale x 2 x half> %va, <vscale x 2 x half> %vb, <vscale x 2 x i1> %m, i32 %evl) 96 ret <vscale x 2 x half> %v 97} 98 99define <vscale x 2 x half> @vfdiv_vf_nxv2f16_unmasked(<vscale x 2 x half> %va, half %b, i32 zeroext %evl) { 100; CHECK-LABEL: vfdiv_vf_nxv2f16_unmasked: 101; CHECK: # %bb.0: 102; CHECK-NEXT: vsetvli a1, zero, e16, mf2, ta, mu 103; CHECK-NEXT: vfmv.v.f v25, fa0 104; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, mu 105; CHECK-NEXT: vfdiv.vv v8, v8, v25 106; CHECK-NEXT: ret 107 %elt.head = insertelement <vscale x 2 x half> undef, half %b, i32 0 108 %vb = shufflevector <vscale x 2 x half> %elt.head, <vscale x 2 x half> undef, <vscale x 2 x i32> zeroinitializer 109 %head = insertelement <vscale x 2 x i1> undef, i1 true, i32 0 110 %m = shufflevector <vscale x 2 x i1> %head, <vscale x 2 x i1> undef, <vscale x 2 x i32> zeroinitializer 111 %v = call <vscale x 2 x half> @llvm.vp.fdiv.nxv2f16(<vscale x 2 x half> %va, <vscale x 2 x half> %vb, <vscale x 2 x i1> %m, i32 %evl) 112 ret <vscale x 2 x half> %v 113} 114 115declare <vscale x 4 x half> @llvm.vp.fdiv.nxv4f16(<vscale x 4 x half>, <vscale x 4 x half>, <vscale x 4 x i1>, i32) 116 117define <vscale x 4 x half> @vfdiv_vv_nxv4f16(<vscale x 4 x half> %va, <vscale x 4 x half> %b, <vscale x 4 x i1> %m, i32 zeroext %evl) { 118; CHECK-LABEL: vfdiv_vv_nxv4f16: 119; CHECK: # %bb.0: 120; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, mu 121; CHECK-NEXT: vfdiv.vv v8, v8, v9, v0.t 122; CHECK-NEXT: ret 123 %v = call <vscale x 4 x half> @llvm.vp.fdiv.nxv4f16(<vscale x 4 x half> %va, <vscale x 4 x half> %b, <vscale x 4 x i1> %m, i32 %evl) 124 ret <vscale x 4 x half> %v 125} 126 127define <vscale x 4 x half> @vfdiv_vv_nxv4f16_unmasked(<vscale x 4 x half> %va, <vscale x 4 x half> %b, i32 zeroext %evl) { 128; CHECK-LABEL: vfdiv_vv_nxv4f16_unmasked: 129; CHECK: # %bb.0: 130; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, mu 131; CHECK-NEXT: vfdiv.vv v8, v8, v9 132; CHECK-NEXT: ret 133 %head = insertelement <vscale x 4 x i1> undef, i1 true, i32 0 134 %m = shufflevector <vscale x 4 x i1> %head, <vscale x 4 x i1> undef, <vscale x 4 x i32> zeroinitializer 135 %v = call <vscale x 4 x half> @llvm.vp.fdiv.nxv4f16(<vscale x 4 x half> %va, <vscale x 4 x half> %b, <vscale x 4 x i1> %m, i32 %evl) 136 ret <vscale x 4 x half> %v 137} 138 139define <vscale x 4 x half> @vfdiv_vf_nxv4f16(<vscale x 4 x half> %va, half %b, <vscale x 4 x i1> %m, i32 zeroext %evl) { 140; CHECK-LABEL: vfdiv_vf_nxv4f16: 141; CHECK: # %bb.0: 142; CHECK-NEXT: vsetvli a1, zero, e16, m1, ta, mu 143; CHECK-NEXT: vfmv.v.f v25, fa0 144; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, mu 145; CHECK-NEXT: vfdiv.vv v8, v8, v25, v0.t 146; CHECK-NEXT: ret 147 %elt.head = insertelement <vscale x 4 x half> undef, half %b, i32 0 148 %vb = shufflevector <vscale x 4 x half> %elt.head, <vscale x 4 x half> undef, <vscale x 4 x i32> zeroinitializer 149 %v = call <vscale x 4 x half> @llvm.vp.fdiv.nxv4f16(<vscale x 4 x half> %va, <vscale x 4 x half> %vb, <vscale x 4 x i1> %m, i32 %evl) 150 ret <vscale x 4 x half> %v 151} 152 153define <vscale x 4 x half> @vfdiv_vf_nxv4f16_unmasked(<vscale x 4 x half> %va, half %b, i32 zeroext %evl) { 154; CHECK-LABEL: vfdiv_vf_nxv4f16_unmasked: 155; CHECK: # %bb.0: 156; CHECK-NEXT: vsetvli a1, zero, e16, m1, ta, mu 157; CHECK-NEXT: vfmv.v.f v25, fa0 158; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, mu 159; CHECK-NEXT: vfdiv.vv v8, v8, v25 160; CHECK-NEXT: ret 161 %elt.head = insertelement <vscale x 4 x half> undef, half %b, i32 0 162 %vb = shufflevector <vscale x 4 x half> %elt.head, <vscale x 4 x half> undef, <vscale x 4 x i32> zeroinitializer 163 %head = insertelement <vscale x 4 x i1> undef, i1 true, i32 0 164 %m = shufflevector <vscale x 4 x i1> %head, <vscale x 4 x i1> undef, <vscale x 4 x i32> zeroinitializer 165 %v = call <vscale x 4 x half> @llvm.vp.fdiv.nxv4f16(<vscale x 4 x half> %va, <vscale x 4 x half> %vb, <vscale x 4 x i1> %m, i32 %evl) 166 ret <vscale x 4 x half> %v 167} 168 169declare <vscale x 8 x half> @llvm.vp.fdiv.nxv8f16(<vscale x 8 x half>, <vscale x 8 x half>, <vscale x 8 x i1>, i32) 170 171define <vscale x 8 x half> @vfdiv_vv_nxv8f16(<vscale x 8 x half> %va, <vscale x 8 x half> %b, <vscale x 8 x i1> %m, i32 zeroext %evl) { 172; CHECK-LABEL: vfdiv_vv_nxv8f16: 173; CHECK: # %bb.0: 174; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, mu 175; CHECK-NEXT: vfdiv.vv v8, v8, v10, v0.t 176; CHECK-NEXT: ret 177 %v = call <vscale x 8 x half> @llvm.vp.fdiv.nxv8f16(<vscale x 8 x half> %va, <vscale x 8 x half> %b, <vscale x 8 x i1> %m, i32 %evl) 178 ret <vscale x 8 x half> %v 179} 180 181define <vscale x 8 x half> @vfdiv_vv_nxv8f16_unmasked(<vscale x 8 x half> %va, <vscale x 8 x half> %b, i32 zeroext %evl) { 182; CHECK-LABEL: vfdiv_vv_nxv8f16_unmasked: 183; CHECK: # %bb.0: 184; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, mu 185; CHECK-NEXT: vfdiv.vv v8, v8, v10 186; CHECK-NEXT: ret 187 %head = insertelement <vscale x 8 x i1> undef, i1 true, i32 0 188 %m = shufflevector <vscale x 8 x i1> %head, <vscale x 8 x i1> undef, <vscale x 8 x i32> zeroinitializer 189 %v = call <vscale x 8 x half> @llvm.vp.fdiv.nxv8f16(<vscale x 8 x half> %va, <vscale x 8 x half> %b, <vscale x 8 x i1> %m, i32 %evl) 190 ret <vscale x 8 x half> %v 191} 192 193define <vscale x 8 x half> @vfdiv_vf_nxv8f16(<vscale x 8 x half> %va, half %b, <vscale x 8 x i1> %m, i32 zeroext %evl) { 194; CHECK-LABEL: vfdiv_vf_nxv8f16: 195; CHECK: # %bb.0: 196; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, mu 197; CHECK-NEXT: vfmv.v.f v26, fa0 198; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, mu 199; CHECK-NEXT: vfdiv.vv v8, v8, v26, v0.t 200; CHECK-NEXT: ret 201 %elt.head = insertelement <vscale x 8 x half> undef, half %b, i32 0 202 %vb = shufflevector <vscale x 8 x half> %elt.head, <vscale x 8 x half> undef, <vscale x 8 x i32> zeroinitializer 203 %v = call <vscale x 8 x half> @llvm.vp.fdiv.nxv8f16(<vscale x 8 x half> %va, <vscale x 8 x half> %vb, <vscale x 8 x i1> %m, i32 %evl) 204 ret <vscale x 8 x half> %v 205} 206 207define <vscale x 8 x half> @vfdiv_vf_nxv8f16_unmasked(<vscale x 8 x half> %va, half %b, i32 zeroext %evl) { 208; CHECK-LABEL: vfdiv_vf_nxv8f16_unmasked: 209; CHECK: # %bb.0: 210; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, mu 211; CHECK-NEXT: vfmv.v.f v26, fa0 212; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, mu 213; CHECK-NEXT: vfdiv.vv v8, v8, v26 214; CHECK-NEXT: ret 215 %elt.head = insertelement <vscale x 8 x half> undef, half %b, i32 0 216 %vb = shufflevector <vscale x 8 x half> %elt.head, <vscale x 8 x half> undef, <vscale x 8 x i32> zeroinitializer 217 %head = insertelement <vscale x 8 x i1> undef, i1 true, i32 0 218 %m = shufflevector <vscale x 8 x i1> %head, <vscale x 8 x i1> undef, <vscale x 8 x i32> zeroinitializer 219 %v = call <vscale x 8 x half> @llvm.vp.fdiv.nxv8f16(<vscale x 8 x half> %va, <vscale x 8 x half> %vb, <vscale x 8 x i1> %m, i32 %evl) 220 ret <vscale x 8 x half> %v 221} 222 223declare <vscale x 16 x half> @llvm.vp.fdiv.nxv16f16(<vscale x 16 x half>, <vscale x 16 x half>, <vscale x 16 x i1>, i32) 224 225define <vscale x 16 x half> @vfdiv_vv_nxv16f16(<vscale x 16 x half> %va, <vscale x 16 x half> %b, <vscale x 16 x i1> %m, i32 zeroext %evl) { 226; CHECK-LABEL: vfdiv_vv_nxv16f16: 227; CHECK: # %bb.0: 228; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, mu 229; CHECK-NEXT: vfdiv.vv v8, v8, v12, v0.t 230; CHECK-NEXT: ret 231 %v = call <vscale x 16 x half> @llvm.vp.fdiv.nxv16f16(<vscale x 16 x half> %va, <vscale x 16 x half> %b, <vscale x 16 x i1> %m, i32 %evl) 232 ret <vscale x 16 x half> %v 233} 234 235define <vscale x 16 x half> @vfdiv_vv_nxv16f16_unmasked(<vscale x 16 x half> %va, <vscale x 16 x half> %b, i32 zeroext %evl) { 236; CHECK-LABEL: vfdiv_vv_nxv16f16_unmasked: 237; CHECK: # %bb.0: 238; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, mu 239; CHECK-NEXT: vfdiv.vv v8, v8, v12 240; CHECK-NEXT: ret 241 %head = insertelement <vscale x 16 x i1> undef, i1 true, i32 0 242 %m = shufflevector <vscale x 16 x i1> %head, <vscale x 16 x i1> undef, <vscale x 16 x i32> zeroinitializer 243 %v = call <vscale x 16 x half> @llvm.vp.fdiv.nxv16f16(<vscale x 16 x half> %va, <vscale x 16 x half> %b, <vscale x 16 x i1> %m, i32 %evl) 244 ret <vscale x 16 x half> %v 245} 246 247define <vscale x 16 x half> @vfdiv_vf_nxv16f16(<vscale x 16 x half> %va, half %b, <vscale x 16 x i1> %m, i32 zeroext %evl) { 248; CHECK-LABEL: vfdiv_vf_nxv16f16: 249; CHECK: # %bb.0: 250; CHECK-NEXT: vsetvli a1, zero, e16, m4, ta, mu 251; CHECK-NEXT: vfmv.v.f v28, fa0 252; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, mu 253; CHECK-NEXT: vfdiv.vv v8, v8, v28, v0.t 254; CHECK-NEXT: ret 255 %elt.head = insertelement <vscale x 16 x half> undef, half %b, i32 0 256 %vb = shufflevector <vscale x 16 x half> %elt.head, <vscale x 16 x half> undef, <vscale x 16 x i32> zeroinitializer 257 %v = call <vscale x 16 x half> @llvm.vp.fdiv.nxv16f16(<vscale x 16 x half> %va, <vscale x 16 x half> %vb, <vscale x 16 x i1> %m, i32 %evl) 258 ret <vscale x 16 x half> %v 259} 260 261define <vscale x 16 x half> @vfdiv_vf_nxv16f16_unmasked(<vscale x 16 x half> %va, half %b, i32 zeroext %evl) { 262; CHECK-LABEL: vfdiv_vf_nxv16f16_unmasked: 263; CHECK: # %bb.0: 264; CHECK-NEXT: vsetvli a1, zero, e16, m4, ta, mu 265; CHECK-NEXT: vfmv.v.f v28, fa0 266; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, mu 267; CHECK-NEXT: vfdiv.vv v8, v8, v28 268; CHECK-NEXT: ret 269 %elt.head = insertelement <vscale x 16 x half> undef, half %b, i32 0 270 %vb = shufflevector <vscale x 16 x half> %elt.head, <vscale x 16 x half> undef, <vscale x 16 x i32> zeroinitializer 271 %head = insertelement <vscale x 16 x i1> undef, i1 true, i32 0 272 %m = shufflevector <vscale x 16 x i1> %head, <vscale x 16 x i1> undef, <vscale x 16 x i32> zeroinitializer 273 %v = call <vscale x 16 x half> @llvm.vp.fdiv.nxv16f16(<vscale x 16 x half> %va, <vscale x 16 x half> %vb, <vscale x 16 x i1> %m, i32 %evl) 274 ret <vscale x 16 x half> %v 275} 276 277declare <vscale x 32 x half> @llvm.vp.fdiv.nxv32f16(<vscale x 32 x half>, <vscale x 32 x half>, <vscale x 32 x i1>, i32) 278 279define <vscale x 32 x half> @vfdiv_vv_nxv32f16(<vscale x 32 x half> %va, <vscale x 32 x half> %b, <vscale x 32 x i1> %m, i32 zeroext %evl) { 280; CHECK-LABEL: vfdiv_vv_nxv32f16: 281; CHECK: # %bb.0: 282; CHECK-NEXT: vsetvli zero, a0, e16, m8, ta, mu 283; CHECK-NEXT: vfdiv.vv v8, v8, v16, v0.t 284; CHECK-NEXT: ret 285 %v = call <vscale x 32 x half> @llvm.vp.fdiv.nxv32f16(<vscale x 32 x half> %va, <vscale x 32 x half> %b, <vscale x 32 x i1> %m, i32 %evl) 286 ret <vscale x 32 x half> %v 287} 288 289define <vscale x 32 x half> @vfdiv_vv_nxv32f16_unmasked(<vscale x 32 x half> %va, <vscale x 32 x half> %b, i32 zeroext %evl) { 290; CHECK-LABEL: vfdiv_vv_nxv32f16_unmasked: 291; CHECK: # %bb.0: 292; CHECK-NEXT: vsetvli zero, a0, e16, m8, ta, mu 293; CHECK-NEXT: vfdiv.vv v8, v8, v16 294; CHECK-NEXT: ret 295 %head = insertelement <vscale x 32 x i1> undef, i1 true, i32 0 296 %m = shufflevector <vscale x 32 x i1> %head, <vscale x 32 x i1> undef, <vscale x 32 x i32> zeroinitializer 297 %v = call <vscale x 32 x half> @llvm.vp.fdiv.nxv32f16(<vscale x 32 x half> %va, <vscale x 32 x half> %b, <vscale x 32 x i1> %m, i32 %evl) 298 ret <vscale x 32 x half> %v 299} 300 301define <vscale x 32 x half> @vfdiv_vf_nxv32f16(<vscale x 32 x half> %va, half %b, <vscale x 32 x i1> %m, i32 zeroext %evl) { 302; CHECK-LABEL: vfdiv_vf_nxv32f16: 303; CHECK: # %bb.0: 304; CHECK-NEXT: vsetvli a1, zero, e16, m8, ta, mu 305; CHECK-NEXT: vfmv.v.f v16, fa0 306; CHECK-NEXT: vsetvli zero, a0, e16, m8, ta, mu 307; CHECK-NEXT: vfdiv.vv v8, v8, v16, v0.t 308; CHECK-NEXT: ret 309 %elt.head = insertelement <vscale x 32 x half> undef, half %b, i32 0 310 %vb = shufflevector <vscale x 32 x half> %elt.head, <vscale x 32 x half> undef, <vscale x 32 x i32> zeroinitializer 311 %v = call <vscale x 32 x half> @llvm.vp.fdiv.nxv32f16(<vscale x 32 x half> %va, <vscale x 32 x half> %vb, <vscale x 32 x i1> %m, i32 %evl) 312 ret <vscale x 32 x half> %v 313} 314 315define <vscale x 32 x half> @vfdiv_vf_nxv32f16_unmasked(<vscale x 32 x half> %va, half %b, i32 zeroext %evl) { 316; CHECK-LABEL: vfdiv_vf_nxv32f16_unmasked: 317; CHECK: # %bb.0: 318; CHECK-NEXT: vsetvli a1, zero, e16, m8, ta, mu 319; CHECK-NEXT: vfmv.v.f v16, fa0 320; CHECK-NEXT: vsetvli zero, a0, e16, m8, ta, mu 321; CHECK-NEXT: vfdiv.vv v8, v8, v16 322; CHECK-NEXT: ret 323 %elt.head = insertelement <vscale x 32 x half> undef, half %b, i32 0 324 %vb = shufflevector <vscale x 32 x half> %elt.head, <vscale x 32 x half> undef, <vscale x 32 x i32> zeroinitializer 325 %head = insertelement <vscale x 32 x i1> undef, i1 true, i32 0 326 %m = shufflevector <vscale x 32 x i1> %head, <vscale x 32 x i1> undef, <vscale x 32 x i32> zeroinitializer 327 %v = call <vscale x 32 x half> @llvm.vp.fdiv.nxv32f16(<vscale x 32 x half> %va, <vscale x 32 x half> %vb, <vscale x 32 x i1> %m, i32 %evl) 328 ret <vscale x 32 x half> %v 329} 330 331declare <vscale x 1 x float> @llvm.vp.fdiv.nxv1f32(<vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x i1>, i32) 332 333define <vscale x 1 x float> @vfdiv_vv_nxv1f32(<vscale x 1 x float> %va, <vscale x 1 x float> %b, <vscale x 1 x i1> %m, i32 zeroext %evl) { 334; CHECK-LABEL: vfdiv_vv_nxv1f32: 335; CHECK: # %bb.0: 336; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, mu 337; CHECK-NEXT: vfdiv.vv v8, v8, v9, v0.t 338; CHECK-NEXT: ret 339 %v = call <vscale x 1 x float> @llvm.vp.fdiv.nxv1f32(<vscale x 1 x float> %va, <vscale x 1 x float> %b, <vscale x 1 x i1> %m, i32 %evl) 340 ret <vscale x 1 x float> %v 341} 342 343define <vscale x 1 x float> @vfdiv_vv_nxv1f32_unmasked(<vscale x 1 x float> %va, <vscale x 1 x float> %b, i32 zeroext %evl) { 344; CHECK-LABEL: vfdiv_vv_nxv1f32_unmasked: 345; CHECK: # %bb.0: 346; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, mu 347; CHECK-NEXT: vfdiv.vv v8, v8, v9 348; CHECK-NEXT: ret 349 %head = insertelement <vscale x 1 x i1> undef, i1 true, i32 0 350 %m = shufflevector <vscale x 1 x i1> %head, <vscale x 1 x i1> undef, <vscale x 1 x i32> zeroinitializer 351 %v = call <vscale x 1 x float> @llvm.vp.fdiv.nxv1f32(<vscale x 1 x float> %va, <vscale x 1 x float> %b, <vscale x 1 x i1> %m, i32 %evl) 352 ret <vscale x 1 x float> %v 353} 354 355define <vscale x 1 x float> @vfdiv_vf_nxv1f32(<vscale x 1 x float> %va, float %b, <vscale x 1 x i1> %m, i32 zeroext %evl) { 356; CHECK-LABEL: vfdiv_vf_nxv1f32: 357; CHECK: # %bb.0: 358; CHECK-NEXT: vsetvli a1, zero, e32, mf2, ta, mu 359; CHECK-NEXT: vfmv.v.f v25, fa0 360; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, mu 361; CHECK-NEXT: vfdiv.vv v8, v8, v25, v0.t 362; CHECK-NEXT: ret 363 %elt.head = insertelement <vscale x 1 x float> undef, float %b, i32 0 364 %vb = shufflevector <vscale x 1 x float> %elt.head, <vscale x 1 x float> undef, <vscale x 1 x i32> zeroinitializer 365 %v = call <vscale x 1 x float> @llvm.vp.fdiv.nxv1f32(<vscale x 1 x float> %va, <vscale x 1 x float> %vb, <vscale x 1 x i1> %m, i32 %evl) 366 ret <vscale x 1 x float> %v 367} 368 369define <vscale x 1 x float> @vfdiv_vf_nxv1f32_unmasked(<vscale x 1 x float> %va, float %b, i32 zeroext %evl) { 370; CHECK-LABEL: vfdiv_vf_nxv1f32_unmasked: 371; CHECK: # %bb.0: 372; CHECK-NEXT: vsetvli a1, zero, e32, mf2, ta, mu 373; CHECK-NEXT: vfmv.v.f v25, fa0 374; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, mu 375; CHECK-NEXT: vfdiv.vv v8, v8, v25 376; CHECK-NEXT: ret 377 %elt.head = insertelement <vscale x 1 x float> undef, float %b, i32 0 378 %vb = shufflevector <vscale x 1 x float> %elt.head, <vscale x 1 x float> undef, <vscale x 1 x i32> zeroinitializer 379 %head = insertelement <vscale x 1 x i1> undef, i1 true, i32 0 380 %m = shufflevector <vscale x 1 x i1> %head, <vscale x 1 x i1> undef, <vscale x 1 x i32> zeroinitializer 381 %v = call <vscale x 1 x float> @llvm.vp.fdiv.nxv1f32(<vscale x 1 x float> %va, <vscale x 1 x float> %vb, <vscale x 1 x i1> %m, i32 %evl) 382 ret <vscale x 1 x float> %v 383} 384 385declare <vscale x 2 x float> @llvm.vp.fdiv.nxv2f32(<vscale x 2 x float>, <vscale x 2 x float>, <vscale x 2 x i1>, i32) 386 387define <vscale x 2 x float> @vfdiv_vv_nxv2f32(<vscale x 2 x float> %va, <vscale x 2 x float> %b, <vscale x 2 x i1> %m, i32 zeroext %evl) { 388; CHECK-LABEL: vfdiv_vv_nxv2f32: 389; CHECK: # %bb.0: 390; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, mu 391; CHECK-NEXT: vfdiv.vv v8, v8, v9, v0.t 392; CHECK-NEXT: ret 393 %v = call <vscale x 2 x float> @llvm.vp.fdiv.nxv2f32(<vscale x 2 x float> %va, <vscale x 2 x float> %b, <vscale x 2 x i1> %m, i32 %evl) 394 ret <vscale x 2 x float> %v 395} 396 397define <vscale x 2 x float> @vfdiv_vv_nxv2f32_unmasked(<vscale x 2 x float> %va, <vscale x 2 x float> %b, i32 zeroext %evl) { 398; CHECK-LABEL: vfdiv_vv_nxv2f32_unmasked: 399; CHECK: # %bb.0: 400; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, mu 401; CHECK-NEXT: vfdiv.vv v8, v8, v9 402; CHECK-NEXT: ret 403 %head = insertelement <vscale x 2 x i1> undef, i1 true, i32 0 404 %m = shufflevector <vscale x 2 x i1> %head, <vscale x 2 x i1> undef, <vscale x 2 x i32> zeroinitializer 405 %v = call <vscale x 2 x float> @llvm.vp.fdiv.nxv2f32(<vscale x 2 x float> %va, <vscale x 2 x float> %b, <vscale x 2 x i1> %m, i32 %evl) 406 ret <vscale x 2 x float> %v 407} 408 409define <vscale x 2 x float> @vfdiv_vf_nxv2f32(<vscale x 2 x float> %va, float %b, <vscale x 2 x i1> %m, i32 zeroext %evl) { 410; CHECK-LABEL: vfdiv_vf_nxv2f32: 411; CHECK: # %bb.0: 412; CHECK-NEXT: vsetvli a1, zero, e32, m1, ta, mu 413; CHECK-NEXT: vfmv.v.f v25, fa0 414; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, mu 415; CHECK-NEXT: vfdiv.vv v8, v8, v25, v0.t 416; CHECK-NEXT: ret 417 %elt.head = insertelement <vscale x 2 x float> undef, float %b, i32 0 418 %vb = shufflevector <vscale x 2 x float> %elt.head, <vscale x 2 x float> undef, <vscale x 2 x i32> zeroinitializer 419 %v = call <vscale x 2 x float> @llvm.vp.fdiv.nxv2f32(<vscale x 2 x float> %va, <vscale x 2 x float> %vb, <vscale x 2 x i1> %m, i32 %evl) 420 ret <vscale x 2 x float> %v 421} 422 423define <vscale x 2 x float> @vfdiv_vf_nxv2f32_unmasked(<vscale x 2 x float> %va, float %b, i32 zeroext %evl) { 424; CHECK-LABEL: vfdiv_vf_nxv2f32_unmasked: 425; CHECK: # %bb.0: 426; CHECK-NEXT: vsetvli a1, zero, e32, m1, ta, mu 427; CHECK-NEXT: vfmv.v.f v25, fa0 428; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, mu 429; CHECK-NEXT: vfdiv.vv v8, v8, v25 430; CHECK-NEXT: ret 431 %elt.head = insertelement <vscale x 2 x float> undef, float %b, i32 0 432 %vb = shufflevector <vscale x 2 x float> %elt.head, <vscale x 2 x float> undef, <vscale x 2 x i32> zeroinitializer 433 %head = insertelement <vscale x 2 x i1> undef, i1 true, i32 0 434 %m = shufflevector <vscale x 2 x i1> %head, <vscale x 2 x i1> undef, <vscale x 2 x i32> zeroinitializer 435 %v = call <vscale x 2 x float> @llvm.vp.fdiv.nxv2f32(<vscale x 2 x float> %va, <vscale x 2 x float> %vb, <vscale x 2 x i1> %m, i32 %evl) 436 ret <vscale x 2 x float> %v 437} 438 439declare <vscale x 4 x float> @llvm.vp.fdiv.nxv4f32(<vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x i1>, i32) 440 441define <vscale x 4 x float> @vfdiv_vv_nxv4f32(<vscale x 4 x float> %va, <vscale x 4 x float> %b, <vscale x 4 x i1> %m, i32 zeroext %evl) { 442; CHECK-LABEL: vfdiv_vv_nxv4f32: 443; CHECK: # %bb.0: 444; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, mu 445; CHECK-NEXT: vfdiv.vv v8, v8, v10, v0.t 446; CHECK-NEXT: ret 447 %v = call <vscale x 4 x float> @llvm.vp.fdiv.nxv4f32(<vscale x 4 x float> %va, <vscale x 4 x float> %b, <vscale x 4 x i1> %m, i32 %evl) 448 ret <vscale x 4 x float> %v 449} 450 451define <vscale x 4 x float> @vfdiv_vv_nxv4f32_unmasked(<vscale x 4 x float> %va, <vscale x 4 x float> %b, i32 zeroext %evl) { 452; CHECK-LABEL: vfdiv_vv_nxv4f32_unmasked: 453; CHECK: # %bb.0: 454; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, mu 455; CHECK-NEXT: vfdiv.vv v8, v8, v10 456; CHECK-NEXT: ret 457 %head = insertelement <vscale x 4 x i1> undef, i1 true, i32 0 458 %m = shufflevector <vscale x 4 x i1> %head, <vscale x 4 x i1> undef, <vscale x 4 x i32> zeroinitializer 459 %v = call <vscale x 4 x float> @llvm.vp.fdiv.nxv4f32(<vscale x 4 x float> %va, <vscale x 4 x float> %b, <vscale x 4 x i1> %m, i32 %evl) 460 ret <vscale x 4 x float> %v 461} 462 463define <vscale x 4 x float> @vfdiv_vf_nxv4f32(<vscale x 4 x float> %va, float %b, <vscale x 4 x i1> %m, i32 zeroext %evl) { 464; CHECK-LABEL: vfdiv_vf_nxv4f32: 465; CHECK: # %bb.0: 466; CHECK-NEXT: vsetvli a1, zero, e32, m2, ta, mu 467; CHECK-NEXT: vfmv.v.f v26, fa0 468; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, mu 469; CHECK-NEXT: vfdiv.vv v8, v8, v26, v0.t 470; CHECK-NEXT: ret 471 %elt.head = insertelement <vscale x 4 x float> undef, float %b, i32 0 472 %vb = shufflevector <vscale x 4 x float> %elt.head, <vscale x 4 x float> undef, <vscale x 4 x i32> zeroinitializer 473 %v = call <vscale x 4 x float> @llvm.vp.fdiv.nxv4f32(<vscale x 4 x float> %va, <vscale x 4 x float> %vb, <vscale x 4 x i1> %m, i32 %evl) 474 ret <vscale x 4 x float> %v 475} 476 477define <vscale x 4 x float> @vfdiv_vf_nxv4f32_unmasked(<vscale x 4 x float> %va, float %b, i32 zeroext %evl) { 478; CHECK-LABEL: vfdiv_vf_nxv4f32_unmasked: 479; CHECK: # %bb.0: 480; CHECK-NEXT: vsetvli a1, zero, e32, m2, ta, mu 481; CHECK-NEXT: vfmv.v.f v26, fa0 482; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, mu 483; CHECK-NEXT: vfdiv.vv v8, v8, v26 484; CHECK-NEXT: ret 485 %elt.head = insertelement <vscale x 4 x float> undef, float %b, i32 0 486 %vb = shufflevector <vscale x 4 x float> %elt.head, <vscale x 4 x float> undef, <vscale x 4 x i32> zeroinitializer 487 %head = insertelement <vscale x 4 x i1> undef, i1 true, i32 0 488 %m = shufflevector <vscale x 4 x i1> %head, <vscale x 4 x i1> undef, <vscale x 4 x i32> zeroinitializer 489 %v = call <vscale x 4 x float> @llvm.vp.fdiv.nxv4f32(<vscale x 4 x float> %va, <vscale x 4 x float> %vb, <vscale x 4 x i1> %m, i32 %evl) 490 ret <vscale x 4 x float> %v 491} 492 493declare <vscale x 8 x float> @llvm.vp.fdiv.nxv8f32(<vscale x 8 x float>, <vscale x 8 x float>, <vscale x 8 x i1>, i32) 494 495define <vscale x 8 x float> @vfdiv_vv_nxv8f32(<vscale x 8 x float> %va, <vscale x 8 x float> %b, <vscale x 8 x i1> %m, i32 zeroext %evl) { 496; CHECK-LABEL: vfdiv_vv_nxv8f32: 497; CHECK: # %bb.0: 498; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, mu 499; CHECK-NEXT: vfdiv.vv v8, v8, v12, v0.t 500; CHECK-NEXT: ret 501 %v = call <vscale x 8 x float> @llvm.vp.fdiv.nxv8f32(<vscale x 8 x float> %va, <vscale x 8 x float> %b, <vscale x 8 x i1> %m, i32 %evl) 502 ret <vscale x 8 x float> %v 503} 504 505define <vscale x 8 x float> @vfdiv_vv_nxv8f32_unmasked(<vscale x 8 x float> %va, <vscale x 8 x float> %b, i32 zeroext %evl) { 506; CHECK-LABEL: vfdiv_vv_nxv8f32_unmasked: 507; CHECK: # %bb.0: 508; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, mu 509; CHECK-NEXT: vfdiv.vv v8, v8, v12 510; CHECK-NEXT: ret 511 %head = insertelement <vscale x 8 x i1> undef, i1 true, i32 0 512 %m = shufflevector <vscale x 8 x i1> %head, <vscale x 8 x i1> undef, <vscale x 8 x i32> zeroinitializer 513 %v = call <vscale x 8 x float> @llvm.vp.fdiv.nxv8f32(<vscale x 8 x float> %va, <vscale x 8 x float> %b, <vscale x 8 x i1> %m, i32 %evl) 514 ret <vscale x 8 x float> %v 515} 516 517define <vscale x 8 x float> @vfdiv_vf_nxv8f32(<vscale x 8 x float> %va, float %b, <vscale x 8 x i1> %m, i32 zeroext %evl) { 518; CHECK-LABEL: vfdiv_vf_nxv8f32: 519; CHECK: # %bb.0: 520; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, mu 521; CHECK-NEXT: vfmv.v.f v28, fa0 522; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, mu 523; CHECK-NEXT: vfdiv.vv v8, v8, v28, v0.t 524; CHECK-NEXT: ret 525 %elt.head = insertelement <vscale x 8 x float> undef, float %b, i32 0 526 %vb = shufflevector <vscale x 8 x float> %elt.head, <vscale x 8 x float> undef, <vscale x 8 x i32> zeroinitializer 527 %v = call <vscale x 8 x float> @llvm.vp.fdiv.nxv8f32(<vscale x 8 x float> %va, <vscale x 8 x float> %vb, <vscale x 8 x i1> %m, i32 %evl) 528 ret <vscale x 8 x float> %v 529} 530 531define <vscale x 8 x float> @vfdiv_vf_nxv8f32_unmasked(<vscale x 8 x float> %va, float %b, i32 zeroext %evl) { 532; CHECK-LABEL: vfdiv_vf_nxv8f32_unmasked: 533; CHECK: # %bb.0: 534; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, mu 535; CHECK-NEXT: vfmv.v.f v28, fa0 536; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, mu 537; CHECK-NEXT: vfdiv.vv v8, v8, v28 538; CHECK-NEXT: ret 539 %elt.head = insertelement <vscale x 8 x float> undef, float %b, i32 0 540 %vb = shufflevector <vscale x 8 x float> %elt.head, <vscale x 8 x float> undef, <vscale x 8 x i32> zeroinitializer 541 %head = insertelement <vscale x 8 x i1> undef, i1 true, i32 0 542 %m = shufflevector <vscale x 8 x i1> %head, <vscale x 8 x i1> undef, <vscale x 8 x i32> zeroinitializer 543 %v = call <vscale x 8 x float> @llvm.vp.fdiv.nxv8f32(<vscale x 8 x float> %va, <vscale x 8 x float> %vb, <vscale x 8 x i1> %m, i32 %evl) 544 ret <vscale x 8 x float> %v 545} 546 547declare <vscale x 16 x float> @llvm.vp.fdiv.nxv16f32(<vscale x 16 x float>, <vscale x 16 x float>, <vscale x 16 x i1>, i32) 548 549define <vscale x 16 x float> @vfdiv_vv_nxv16f32(<vscale x 16 x float> %va, <vscale x 16 x float> %b, <vscale x 16 x i1> %m, i32 zeroext %evl) { 550; CHECK-LABEL: vfdiv_vv_nxv16f32: 551; CHECK: # %bb.0: 552; CHECK-NEXT: vsetvli zero, a0, e32, m8, ta, mu 553; CHECK-NEXT: vfdiv.vv v8, v8, v16, v0.t 554; CHECK-NEXT: ret 555 %v = call <vscale x 16 x float> @llvm.vp.fdiv.nxv16f32(<vscale x 16 x float> %va, <vscale x 16 x float> %b, <vscale x 16 x i1> %m, i32 %evl) 556 ret <vscale x 16 x float> %v 557} 558 559define <vscale x 16 x float> @vfdiv_vv_nxv16f32_unmasked(<vscale x 16 x float> %va, <vscale x 16 x float> %b, i32 zeroext %evl) { 560; CHECK-LABEL: vfdiv_vv_nxv16f32_unmasked: 561; CHECK: # %bb.0: 562; CHECK-NEXT: vsetvli zero, a0, e32, m8, ta, mu 563; CHECK-NEXT: vfdiv.vv v8, v8, v16 564; CHECK-NEXT: ret 565 %head = insertelement <vscale x 16 x i1> undef, i1 true, i32 0 566 %m = shufflevector <vscale x 16 x i1> %head, <vscale x 16 x i1> undef, <vscale x 16 x i32> zeroinitializer 567 %v = call <vscale x 16 x float> @llvm.vp.fdiv.nxv16f32(<vscale x 16 x float> %va, <vscale x 16 x float> %b, <vscale x 16 x i1> %m, i32 %evl) 568 ret <vscale x 16 x float> %v 569} 570 571define <vscale x 16 x float> @vfdiv_vf_nxv16f32(<vscale x 16 x float> %va, float %b, <vscale x 16 x i1> %m, i32 zeroext %evl) { 572; CHECK-LABEL: vfdiv_vf_nxv16f32: 573; CHECK: # %bb.0: 574; CHECK-NEXT: vsetvli a1, zero, e32, m8, ta, mu 575; CHECK-NEXT: vfmv.v.f v16, fa0 576; CHECK-NEXT: vsetvli zero, a0, e32, m8, ta, mu 577; CHECK-NEXT: vfdiv.vv v8, v8, v16, v0.t 578; CHECK-NEXT: ret 579 %elt.head = insertelement <vscale x 16 x float> undef, float %b, i32 0 580 %vb = shufflevector <vscale x 16 x float> %elt.head, <vscale x 16 x float> undef, <vscale x 16 x i32> zeroinitializer 581 %v = call <vscale x 16 x float> @llvm.vp.fdiv.nxv16f32(<vscale x 16 x float> %va, <vscale x 16 x float> %vb, <vscale x 16 x i1> %m, i32 %evl) 582 ret <vscale x 16 x float> %v 583} 584 585define <vscale x 16 x float> @vfdiv_vf_nxv16f32_unmasked(<vscale x 16 x float> %va, float %b, i32 zeroext %evl) { 586; CHECK-LABEL: vfdiv_vf_nxv16f32_unmasked: 587; CHECK: # %bb.0: 588; CHECK-NEXT: vsetvli a1, zero, e32, m8, ta, mu 589; CHECK-NEXT: vfmv.v.f v16, fa0 590; CHECK-NEXT: vsetvli zero, a0, e32, m8, ta, mu 591; CHECK-NEXT: vfdiv.vv v8, v8, v16 592; CHECK-NEXT: ret 593 %elt.head = insertelement <vscale x 16 x float> undef, float %b, i32 0 594 %vb = shufflevector <vscale x 16 x float> %elt.head, <vscale x 16 x float> undef, <vscale x 16 x i32> zeroinitializer 595 %head = insertelement <vscale x 16 x i1> undef, i1 true, i32 0 596 %m = shufflevector <vscale x 16 x i1> %head, <vscale x 16 x i1> undef, <vscale x 16 x i32> zeroinitializer 597 %v = call <vscale x 16 x float> @llvm.vp.fdiv.nxv16f32(<vscale x 16 x float> %va, <vscale x 16 x float> %vb, <vscale x 16 x i1> %m, i32 %evl) 598 ret <vscale x 16 x float> %v 599} 600 601declare <vscale x 1 x double> @llvm.vp.fdiv.nxv1f64(<vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x i1>, i32) 602 603define <vscale x 1 x double> @vfdiv_vv_nxv1f64(<vscale x 1 x double> %va, <vscale x 1 x double> %b, <vscale x 1 x i1> %m, i32 zeroext %evl) { 604; CHECK-LABEL: vfdiv_vv_nxv1f64: 605; CHECK: # %bb.0: 606; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, mu 607; CHECK-NEXT: vfdiv.vv v8, v8, v9, v0.t 608; CHECK-NEXT: ret 609 %v = call <vscale x 1 x double> @llvm.vp.fdiv.nxv1f64(<vscale x 1 x double> %va, <vscale x 1 x double> %b, <vscale x 1 x i1> %m, i32 %evl) 610 ret <vscale x 1 x double> %v 611} 612 613define <vscale x 1 x double> @vfdiv_vv_nxv1f64_unmasked(<vscale x 1 x double> %va, <vscale x 1 x double> %b, i32 zeroext %evl) { 614; CHECK-LABEL: vfdiv_vv_nxv1f64_unmasked: 615; CHECK: # %bb.0: 616; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, mu 617; CHECK-NEXT: vfdiv.vv v8, v8, v9 618; CHECK-NEXT: ret 619 %head = insertelement <vscale x 1 x i1> undef, i1 true, i32 0 620 %m = shufflevector <vscale x 1 x i1> %head, <vscale x 1 x i1> undef, <vscale x 1 x i32> zeroinitializer 621 %v = call <vscale x 1 x double> @llvm.vp.fdiv.nxv1f64(<vscale x 1 x double> %va, <vscale x 1 x double> %b, <vscale x 1 x i1> %m, i32 %evl) 622 ret <vscale x 1 x double> %v 623} 624 625define <vscale x 1 x double> @vfdiv_vf_nxv1f64(<vscale x 1 x double> %va, double %b, <vscale x 1 x i1> %m, i32 zeroext %evl) { 626; CHECK-LABEL: vfdiv_vf_nxv1f64: 627; CHECK: # %bb.0: 628; CHECK-NEXT: vsetvli a1, zero, e64, m1, ta, mu 629; CHECK-NEXT: vfmv.v.f v25, fa0 630; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, mu 631; CHECK-NEXT: vfdiv.vv v8, v8, v25, v0.t 632; CHECK-NEXT: ret 633 %elt.head = insertelement <vscale x 1 x double> undef, double %b, i32 0 634 %vb = shufflevector <vscale x 1 x double> %elt.head, <vscale x 1 x double> undef, <vscale x 1 x i32> zeroinitializer 635 %v = call <vscale x 1 x double> @llvm.vp.fdiv.nxv1f64(<vscale x 1 x double> %va, <vscale x 1 x double> %vb, <vscale x 1 x i1> %m, i32 %evl) 636 ret <vscale x 1 x double> %v 637} 638 639define <vscale x 1 x double> @vfdiv_vf_nxv1f64_unmasked(<vscale x 1 x double> %va, double %b, i32 zeroext %evl) { 640; CHECK-LABEL: vfdiv_vf_nxv1f64_unmasked: 641; CHECK: # %bb.0: 642; CHECK-NEXT: vsetvli a1, zero, e64, m1, ta, mu 643; CHECK-NEXT: vfmv.v.f v25, fa0 644; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, mu 645; CHECK-NEXT: vfdiv.vv v8, v8, v25 646; CHECK-NEXT: ret 647 %elt.head = insertelement <vscale x 1 x double> undef, double %b, i32 0 648 %vb = shufflevector <vscale x 1 x double> %elt.head, <vscale x 1 x double> undef, <vscale x 1 x i32> zeroinitializer 649 %head = insertelement <vscale x 1 x i1> undef, i1 true, i32 0 650 %m = shufflevector <vscale x 1 x i1> %head, <vscale x 1 x i1> undef, <vscale x 1 x i32> zeroinitializer 651 %v = call <vscale x 1 x double> @llvm.vp.fdiv.nxv1f64(<vscale x 1 x double> %va, <vscale x 1 x double> %vb, <vscale x 1 x i1> %m, i32 %evl) 652 ret <vscale x 1 x double> %v 653} 654 655declare <vscale x 2 x double> @llvm.vp.fdiv.nxv2f64(<vscale x 2 x double>, <vscale x 2 x double>, <vscale x 2 x i1>, i32) 656 657define <vscale x 2 x double> @vfdiv_vv_nxv2f64(<vscale x 2 x double> %va, <vscale x 2 x double> %b, <vscale x 2 x i1> %m, i32 zeroext %evl) { 658; CHECK-LABEL: vfdiv_vv_nxv2f64: 659; CHECK: # %bb.0: 660; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, mu 661; CHECK-NEXT: vfdiv.vv v8, v8, v10, v0.t 662; CHECK-NEXT: ret 663 %v = call <vscale x 2 x double> @llvm.vp.fdiv.nxv2f64(<vscale x 2 x double> %va, <vscale x 2 x double> %b, <vscale x 2 x i1> %m, i32 %evl) 664 ret <vscale x 2 x double> %v 665} 666 667define <vscale x 2 x double> @vfdiv_vv_nxv2f64_unmasked(<vscale x 2 x double> %va, <vscale x 2 x double> %b, i32 zeroext %evl) { 668; CHECK-LABEL: vfdiv_vv_nxv2f64_unmasked: 669; CHECK: # %bb.0: 670; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, mu 671; CHECK-NEXT: vfdiv.vv v8, v8, v10 672; CHECK-NEXT: ret 673 %head = insertelement <vscale x 2 x i1> undef, i1 true, i32 0 674 %m = shufflevector <vscale x 2 x i1> %head, <vscale x 2 x i1> undef, <vscale x 2 x i32> zeroinitializer 675 %v = call <vscale x 2 x double> @llvm.vp.fdiv.nxv2f64(<vscale x 2 x double> %va, <vscale x 2 x double> %b, <vscale x 2 x i1> %m, i32 %evl) 676 ret <vscale x 2 x double> %v 677} 678 679define <vscale x 2 x double> @vfdiv_vf_nxv2f64(<vscale x 2 x double> %va, double %b, <vscale x 2 x i1> %m, i32 zeroext %evl) { 680; CHECK-LABEL: vfdiv_vf_nxv2f64: 681; CHECK: # %bb.0: 682; CHECK-NEXT: vsetvli a1, zero, e64, m2, ta, mu 683; CHECK-NEXT: vfmv.v.f v26, fa0 684; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, mu 685; CHECK-NEXT: vfdiv.vv v8, v8, v26, v0.t 686; CHECK-NEXT: ret 687 %elt.head = insertelement <vscale x 2 x double> undef, double %b, i32 0 688 %vb = shufflevector <vscale x 2 x double> %elt.head, <vscale x 2 x double> undef, <vscale x 2 x i32> zeroinitializer 689 %v = call <vscale x 2 x double> @llvm.vp.fdiv.nxv2f64(<vscale x 2 x double> %va, <vscale x 2 x double> %vb, <vscale x 2 x i1> %m, i32 %evl) 690 ret <vscale x 2 x double> %v 691} 692 693define <vscale x 2 x double> @vfdiv_vf_nxv2f64_unmasked(<vscale x 2 x double> %va, double %b, i32 zeroext %evl) { 694; CHECK-LABEL: vfdiv_vf_nxv2f64_unmasked: 695; CHECK: # %bb.0: 696; CHECK-NEXT: vsetvli a1, zero, e64, m2, ta, mu 697; CHECK-NEXT: vfmv.v.f v26, fa0 698; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, mu 699; CHECK-NEXT: vfdiv.vv v8, v8, v26 700; CHECK-NEXT: ret 701 %elt.head = insertelement <vscale x 2 x double> undef, double %b, i32 0 702 %vb = shufflevector <vscale x 2 x double> %elt.head, <vscale x 2 x double> undef, <vscale x 2 x i32> zeroinitializer 703 %head = insertelement <vscale x 2 x i1> undef, i1 true, i32 0 704 %m = shufflevector <vscale x 2 x i1> %head, <vscale x 2 x i1> undef, <vscale x 2 x i32> zeroinitializer 705 %v = call <vscale x 2 x double> @llvm.vp.fdiv.nxv2f64(<vscale x 2 x double> %va, <vscale x 2 x double> %vb, <vscale x 2 x i1> %m, i32 %evl) 706 ret <vscale x 2 x double> %v 707} 708 709declare <vscale x 4 x double> @llvm.vp.fdiv.nxv4f64(<vscale x 4 x double>, <vscale x 4 x double>, <vscale x 4 x i1>, i32) 710 711define <vscale x 4 x double> @vfdiv_vv_nxv4f64(<vscale x 4 x double> %va, <vscale x 4 x double> %b, <vscale x 4 x i1> %m, i32 zeroext %evl) { 712; CHECK-LABEL: vfdiv_vv_nxv4f64: 713; CHECK: # %bb.0: 714; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, mu 715; CHECK-NEXT: vfdiv.vv v8, v8, v12, v0.t 716; CHECK-NEXT: ret 717 %v = call <vscale x 4 x double> @llvm.vp.fdiv.nxv4f64(<vscale x 4 x double> %va, <vscale x 4 x double> %b, <vscale x 4 x i1> %m, i32 %evl) 718 ret <vscale x 4 x double> %v 719} 720 721define <vscale x 4 x double> @vfdiv_vv_nxv4f64_unmasked(<vscale x 4 x double> %va, <vscale x 4 x double> %b, i32 zeroext %evl) { 722; CHECK-LABEL: vfdiv_vv_nxv4f64_unmasked: 723; CHECK: # %bb.0: 724; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, mu 725; CHECK-NEXT: vfdiv.vv v8, v8, v12 726; CHECK-NEXT: ret 727 %head = insertelement <vscale x 4 x i1> undef, i1 true, i32 0 728 %m = shufflevector <vscale x 4 x i1> %head, <vscale x 4 x i1> undef, <vscale x 4 x i32> zeroinitializer 729 %v = call <vscale x 4 x double> @llvm.vp.fdiv.nxv4f64(<vscale x 4 x double> %va, <vscale x 4 x double> %b, <vscale x 4 x i1> %m, i32 %evl) 730 ret <vscale x 4 x double> %v 731} 732 733define <vscale x 4 x double> @vfdiv_vf_nxv4f64(<vscale x 4 x double> %va, double %b, <vscale x 4 x i1> %m, i32 zeroext %evl) { 734; CHECK-LABEL: vfdiv_vf_nxv4f64: 735; CHECK: # %bb.0: 736; CHECK-NEXT: vsetvli a1, zero, e64, m4, ta, mu 737; CHECK-NEXT: vfmv.v.f v28, fa0 738; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, mu 739; CHECK-NEXT: vfdiv.vv v8, v8, v28, v0.t 740; CHECK-NEXT: ret 741 %elt.head = insertelement <vscale x 4 x double> undef, double %b, i32 0 742 %vb = shufflevector <vscale x 4 x double> %elt.head, <vscale x 4 x double> undef, <vscale x 4 x i32> zeroinitializer 743 %v = call <vscale x 4 x double> @llvm.vp.fdiv.nxv4f64(<vscale x 4 x double> %va, <vscale x 4 x double> %vb, <vscale x 4 x i1> %m, i32 %evl) 744 ret <vscale x 4 x double> %v 745} 746 747define <vscale x 4 x double> @vfdiv_vf_nxv4f64_unmasked(<vscale x 4 x double> %va, double %b, i32 zeroext %evl) { 748; CHECK-LABEL: vfdiv_vf_nxv4f64_unmasked: 749; CHECK: # %bb.0: 750; CHECK-NEXT: vsetvli a1, zero, e64, m4, ta, mu 751; CHECK-NEXT: vfmv.v.f v28, fa0 752; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, mu 753; CHECK-NEXT: vfdiv.vv v8, v8, v28 754; CHECK-NEXT: ret 755 %elt.head = insertelement <vscale x 4 x double> undef, double %b, i32 0 756 %vb = shufflevector <vscale x 4 x double> %elt.head, <vscale x 4 x double> undef, <vscale x 4 x i32> zeroinitializer 757 %head = insertelement <vscale x 4 x i1> undef, i1 true, i32 0 758 %m = shufflevector <vscale x 4 x i1> %head, <vscale x 4 x i1> undef, <vscale x 4 x i32> zeroinitializer 759 %v = call <vscale x 4 x double> @llvm.vp.fdiv.nxv4f64(<vscale x 4 x double> %va, <vscale x 4 x double> %vb, <vscale x 4 x i1> %m, i32 %evl) 760 ret <vscale x 4 x double> %v 761} 762 763declare <vscale x 8 x double> @llvm.vp.fdiv.nxv8f64(<vscale x 8 x double>, <vscale x 8 x double>, <vscale x 8 x i1>, i32) 764 765define <vscale x 8 x double> @vfdiv_vv_nxv8f64(<vscale x 8 x double> %va, <vscale x 8 x double> %b, <vscale x 8 x i1> %m, i32 zeroext %evl) { 766; CHECK-LABEL: vfdiv_vv_nxv8f64: 767; CHECK: # %bb.0: 768; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, mu 769; CHECK-NEXT: vfdiv.vv v8, v8, v16, v0.t 770; CHECK-NEXT: ret 771 %v = call <vscale x 8 x double> @llvm.vp.fdiv.nxv8f64(<vscale x 8 x double> %va, <vscale x 8 x double> %b, <vscale x 8 x i1> %m, i32 %evl) 772 ret <vscale x 8 x double> %v 773} 774 775define <vscale x 8 x double> @vfdiv_vv_nxv8f64_unmasked(<vscale x 8 x double> %va, <vscale x 8 x double> %b, i32 zeroext %evl) { 776; CHECK-LABEL: vfdiv_vv_nxv8f64_unmasked: 777; CHECK: # %bb.0: 778; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, mu 779; CHECK-NEXT: vfdiv.vv v8, v8, v16 780; CHECK-NEXT: ret 781 %head = insertelement <vscale x 8 x i1> undef, i1 true, i32 0 782 %m = shufflevector <vscale x 8 x i1> %head, <vscale x 8 x i1> undef, <vscale x 8 x i32> zeroinitializer 783 %v = call <vscale x 8 x double> @llvm.vp.fdiv.nxv8f64(<vscale x 8 x double> %va, <vscale x 8 x double> %b, <vscale x 8 x i1> %m, i32 %evl) 784 ret <vscale x 8 x double> %v 785} 786 787define <vscale x 8 x double> @vfdiv_vf_nxv8f64(<vscale x 8 x double> %va, double %b, <vscale x 8 x i1> %m, i32 zeroext %evl) { 788; CHECK-LABEL: vfdiv_vf_nxv8f64: 789; CHECK: # %bb.0: 790; CHECK-NEXT: vsetvli a1, zero, e64, m8, ta, mu 791; CHECK-NEXT: vfmv.v.f v16, fa0 792; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, mu 793; CHECK-NEXT: vfdiv.vv v8, v8, v16, v0.t 794; CHECK-NEXT: ret 795 %elt.head = insertelement <vscale x 8 x double> undef, double %b, i32 0 796 %vb = shufflevector <vscale x 8 x double> %elt.head, <vscale x 8 x double> undef, <vscale x 8 x i32> zeroinitializer 797 %v = call <vscale x 8 x double> @llvm.vp.fdiv.nxv8f64(<vscale x 8 x double> %va, <vscale x 8 x double> %vb, <vscale x 8 x i1> %m, i32 %evl) 798 ret <vscale x 8 x double> %v 799} 800 801define <vscale x 8 x double> @vfdiv_vf_nxv8f64_unmasked(<vscale x 8 x double> %va, double %b, i32 zeroext %evl) { 802; CHECK-LABEL: vfdiv_vf_nxv8f64_unmasked: 803; CHECK: # %bb.0: 804; CHECK-NEXT: vsetvli a1, zero, e64, m8, ta, mu 805; CHECK-NEXT: vfmv.v.f v16, fa0 806; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, mu 807; CHECK-NEXT: vfdiv.vv v8, v8, v16 808; CHECK-NEXT: ret 809 %elt.head = insertelement <vscale x 8 x double> undef, double %b, i32 0 810 %vb = shufflevector <vscale x 8 x double> %elt.head, <vscale x 8 x double> undef, <vscale x 8 x i32> zeroinitializer 811 %head = insertelement <vscale x 8 x i1> undef, i1 true, i32 0 812 %m = shufflevector <vscale x 8 x i1> %head, <vscale x 8 x i1> undef, <vscale x 8 x i32> zeroinitializer 813 %v = call <vscale x 8 x double> @llvm.vp.fdiv.nxv8f64(<vscale x 8 x double> %va, <vscale x 8 x double> %vb, <vscale x 8 x i1> %m, i32 %evl) 814 ret <vscale x 8 x double> %v 815} 816