brintos

brintos / llvm-project-archived public Read only

0
0
Text · 13.4 KiB · 52e09f6 Raw
294 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc -mtriple=riscv32 -mattr=+d,+zvfh,+v -target-abi=ilp32d \3; RUN:   -verify-machineinstrs < %s | FileCheck %s4; RUN: llc -mtriple=riscv64 -mattr=+d,+zvfh,+v -target-abi=lp64d \5; RUN:   -verify-machineinstrs < %s | FileCheck %s6 7define <2 x half> @vfrdiv_vf_v2f16(<2 x half> %va, half %b, <2 x i1> %m, i32 zeroext %evl) {8; CHECK-LABEL: vfrdiv_vf_v2f16:9; CHECK:       # %bb.0:10; CHECK-NEXT:    vsetvli zero, a0, e16, mf4, ta, ma11; CHECK-NEXT:    vfrdiv.vf v8, v8, fa0, v0.t12; CHECK-NEXT:    ret13  %elt.head = insertelement <2 x half> poison, half %b, i32 014  %vb = shufflevector <2 x half> %elt.head, <2 x half> poison, <2 x i32> zeroinitializer15  %v = call <2 x half> @llvm.vp.fdiv.v2f16(<2 x half> %vb, <2 x half> %va, <2 x i1> %m, i32 %evl)16  ret <2 x half> %v17}18 19define <2 x half> @vfrdiv_vf_v2f16_unmasked(<2 x half> %va, half %b, i32 zeroext %evl) {20; CHECK-LABEL: vfrdiv_vf_v2f16_unmasked:21; CHECK:       # %bb.0:22; CHECK-NEXT:    vsetvli zero, a0, e16, mf4, ta, ma23; CHECK-NEXT:    vfrdiv.vf v8, v8, fa024; CHECK-NEXT:    ret25  %elt.head = insertelement <2 x half> poison, half %b, i32 026  %vb = shufflevector <2 x half> %elt.head, <2 x half> poison, <2 x i32> zeroinitializer27  %v = call <2 x half> @llvm.vp.fdiv.v2f16(<2 x half> %vb, <2 x half> %va, <2 x i1> splat (i1 true), i32 %evl)28  ret <2 x half> %v29}30 31define <4 x half> @vfrdiv_vf_v4f16(<4 x half> %va, half %b, <4 x i1> %m, i32 zeroext %evl) {32; CHECK-LABEL: vfrdiv_vf_v4f16:33; CHECK:       # %bb.0:34; CHECK-NEXT:    vsetvli zero, a0, e16, mf2, ta, ma35; CHECK-NEXT:    vfrdiv.vf v8, v8, fa0, v0.t36; CHECK-NEXT:    ret37  %elt.head = insertelement <4 x half> poison, half %b, i32 038  %vb = shufflevector <4 x half> %elt.head, <4 x half> poison, <4 x i32> zeroinitializer39  %v = call <4 x half> @llvm.vp.fdiv.v4f16(<4 x half> %vb, <4 x half> %va, <4 x i1> %m, i32 %evl)40  ret <4 x half> %v41}42 43define <4 x half> @vfrdiv_vf_v4f16_unmasked(<4 x half> %va, half %b, i32 zeroext %evl) {44; CHECK-LABEL: vfrdiv_vf_v4f16_unmasked:45; CHECK:       # %bb.0:46; CHECK-NEXT:    vsetvli zero, a0, e16, mf2, ta, ma47; CHECK-NEXT:    vfrdiv.vf v8, v8, fa048; CHECK-NEXT:    ret49  %elt.head = insertelement <4 x half> poison, half %b, i32 050  %vb = shufflevector <4 x half> %elt.head, <4 x half> poison, <4 x i32> zeroinitializer51  %v = call <4 x half> @llvm.vp.fdiv.v4f16(<4 x half> %vb, <4 x half> %va, <4 x i1> splat (i1 true), i32 %evl)52  ret <4 x half> %v53}54 55define <8 x half> @vfrdiv_vf_v8f16(<8 x half> %va, half %b, <8 x i1> %m, i32 zeroext %evl) {56; CHECK-LABEL: vfrdiv_vf_v8f16:57; CHECK:       # %bb.0:58; CHECK-NEXT:    vsetvli zero, a0, e16, m1, ta, ma59; CHECK-NEXT:    vfrdiv.vf v8, v8, fa0, v0.t60; CHECK-NEXT:    ret61  %elt.head = insertelement <8 x half> poison, half %b, i32 062  %vb = shufflevector <8 x half> %elt.head, <8 x half> poison, <8 x i32> zeroinitializer63  %v = call <8 x half> @llvm.vp.fdiv.v8f16(<8 x half> %vb, <8 x half> %va, <8 x i1> %m, i32 %evl)64  ret <8 x half> %v65}66 67define <8 x half> @vfrdiv_vf_v8f16_unmasked(<8 x half> %va, half %b, i32 zeroext %evl) {68; CHECK-LABEL: vfrdiv_vf_v8f16_unmasked:69; CHECK:       # %bb.0:70; CHECK-NEXT:    vsetvli zero, a0, e16, m1, ta, ma71; CHECK-NEXT:    vfrdiv.vf v8, v8, fa072; CHECK-NEXT:    ret73  %elt.head = insertelement <8 x half> poison, half %b, i32 074  %vb = shufflevector <8 x half> %elt.head, <8 x half> poison, <8 x i32> zeroinitializer75  %v = call <8 x half> @llvm.vp.fdiv.v8f16(<8 x half> %vb, <8 x half> %va, <8 x i1> splat (i1 true), i32 %evl)76  ret <8 x half> %v77}78 79define <16 x half> @vfrdiv_vf_v16f16(<16 x half> %va, half %b, <16 x i1> %m, i32 zeroext %evl) {80; CHECK-LABEL: vfrdiv_vf_v16f16:81; CHECK:       # %bb.0:82; CHECK-NEXT:    vsetvli zero, a0, e16, m2, ta, ma83; CHECK-NEXT:    vfrdiv.vf v8, v8, fa0, v0.t84; CHECK-NEXT:    ret85  %elt.head = insertelement <16 x half> poison, half %b, i32 086  %vb = shufflevector <16 x half> %elt.head, <16 x half> poison, <16 x i32> zeroinitializer87  %v = call <16 x half> @llvm.vp.fdiv.v16f16(<16 x half> %vb, <16 x half> %va, <16 x i1> %m, i32 %evl)88  ret <16 x half> %v89}90 91define <16 x half> @vfrdiv_vf_v16f16_unmasked(<16 x half> %va, half %b, i32 zeroext %evl) {92; CHECK-LABEL: vfrdiv_vf_v16f16_unmasked:93; CHECK:       # %bb.0:94; CHECK-NEXT:    vsetvli zero, a0, e16, m2, ta, ma95; CHECK-NEXT:    vfrdiv.vf v8, v8, fa096; CHECK-NEXT:    ret97  %elt.head = insertelement <16 x half> poison, half %b, i32 098  %vb = shufflevector <16 x half> %elt.head, <16 x half> poison, <16 x i32> zeroinitializer99  %v = call <16 x half> @llvm.vp.fdiv.v16f16(<16 x half> %vb, <16 x half> %va, <16 x i1> splat (i1 true), i32 %evl)100  ret <16 x half> %v101}102 103define <2 x float> @vfrdiv_vf_v2f32(<2 x float> %va, float %b, <2 x i1> %m, i32 zeroext %evl) {104; CHECK-LABEL: vfrdiv_vf_v2f32:105; CHECK:       # %bb.0:106; CHECK-NEXT:    vsetvli zero, a0, e32, mf2, ta, ma107; CHECK-NEXT:    vfrdiv.vf v8, v8, fa0, v0.t108; CHECK-NEXT:    ret109  %elt.head = insertelement <2 x float> poison, float %b, i32 0110  %vb = shufflevector <2 x float> %elt.head, <2 x float> poison, <2 x i32> zeroinitializer111  %v = call <2 x float> @llvm.vp.fdiv.v2f32(<2 x float> %vb, <2 x float> %va, <2 x i1> %m, i32 %evl)112  ret <2 x float> %v113}114 115define <2 x float> @vfrdiv_vf_v2f32_unmasked(<2 x float> %va, float %b, i32 zeroext %evl) {116; CHECK-LABEL: vfrdiv_vf_v2f32_unmasked:117; CHECK:       # %bb.0:118; CHECK-NEXT:    vsetvli zero, a0, e32, mf2, ta, ma119; CHECK-NEXT:    vfrdiv.vf v8, v8, fa0120; CHECK-NEXT:    ret121  %elt.head = insertelement <2 x float> poison, float %b, i32 0122  %vb = shufflevector <2 x float> %elt.head, <2 x float> poison, <2 x i32> zeroinitializer123  %v = call <2 x float> @llvm.vp.fdiv.v2f32(<2 x float> %vb, <2 x float> %va, <2 x i1> splat (i1 true), i32 %evl)124  ret <2 x float> %v125}126 127define <4 x float> @vfrdiv_vf_v4f32(<4 x float> %va, float %b, <4 x i1> %m, i32 zeroext %evl) {128; CHECK-LABEL: vfrdiv_vf_v4f32:129; CHECK:       # %bb.0:130; CHECK-NEXT:    vsetvli zero, a0, e32, m1, ta, ma131; CHECK-NEXT:    vfrdiv.vf v8, v8, fa0, v0.t132; CHECK-NEXT:    ret133  %elt.head = insertelement <4 x float> poison, float %b, i32 0134  %vb = shufflevector <4 x float> %elt.head, <4 x float> poison, <4 x i32> zeroinitializer135  %v = call <4 x float> @llvm.vp.fdiv.v4f32(<4 x float> %vb, <4 x float> %va, <4 x i1> %m, i32 %evl)136  ret <4 x float> %v137}138 139define <4 x float> @vfrdiv_vf_v4f32_unmasked(<4 x float> %va, float %b, i32 zeroext %evl) {140; CHECK-LABEL: vfrdiv_vf_v4f32_unmasked:141; CHECK:       # %bb.0:142; CHECK-NEXT:    vsetvli zero, a0, e32, m1, ta, ma143; CHECK-NEXT:    vfrdiv.vf v8, v8, fa0144; CHECK-NEXT:    ret145  %elt.head = insertelement <4 x float> poison, float %b, i32 0146  %vb = shufflevector <4 x float> %elt.head, <4 x float> poison, <4 x i32> zeroinitializer147  %v = call <4 x float> @llvm.vp.fdiv.v4f32(<4 x float> %vb, <4 x float> %va, <4 x i1> splat (i1 true), i32 %evl)148  ret <4 x float> %v149}150 151define <8 x float> @vfrdiv_vf_v8f32(<8 x float> %va, float %b, <8 x i1> %m, i32 zeroext %evl) {152; CHECK-LABEL: vfrdiv_vf_v8f32:153; CHECK:       # %bb.0:154; CHECK-NEXT:    vsetvli zero, a0, e32, m2, ta, ma155; CHECK-NEXT:    vfrdiv.vf v8, v8, fa0, v0.t156; CHECK-NEXT:    ret157  %elt.head = insertelement <8 x float> poison, float %b, i32 0158  %vb = shufflevector <8 x float> %elt.head, <8 x float> poison, <8 x i32> zeroinitializer159  %v = call <8 x float> @llvm.vp.fdiv.v8f32(<8 x float> %vb, <8 x float> %va, <8 x i1> %m, i32 %evl)160  ret <8 x float> %v161}162 163define <8 x float> @vfrdiv_vf_v8f32_unmasked(<8 x float> %va, float %b, i32 zeroext %evl) {164; CHECK-LABEL: vfrdiv_vf_v8f32_unmasked:165; CHECK:       # %bb.0:166; CHECK-NEXT:    vsetvli zero, a0, e32, m2, ta, ma167; CHECK-NEXT:    vfrdiv.vf v8, v8, fa0168; CHECK-NEXT:    ret169  %elt.head = insertelement <8 x float> poison, float %b, i32 0170  %vb = shufflevector <8 x float> %elt.head, <8 x float> poison, <8 x i32> zeroinitializer171  %v = call <8 x float> @llvm.vp.fdiv.v8f32(<8 x float> %vb, <8 x float> %va, <8 x i1> splat (i1 true), i32 %evl)172  ret <8 x float> %v173}174 175define <16 x float> @vfrdiv_vf_v16f32(<16 x float> %va, float %b, <16 x i1> %m, i32 zeroext %evl) {176; CHECK-LABEL: vfrdiv_vf_v16f32:177; CHECK:       # %bb.0:178; CHECK-NEXT:    vsetvli zero, a0, e32, m4, ta, ma179; CHECK-NEXT:    vfrdiv.vf v8, v8, fa0, v0.t180; CHECK-NEXT:    ret181  %elt.head = insertelement <16 x float> poison, float %b, i32 0182  %vb = shufflevector <16 x float> %elt.head, <16 x float> poison, <16 x i32> zeroinitializer183  %v = call <16 x float> @llvm.vp.fdiv.v16f32(<16 x float> %vb, <16 x float> %va, <16 x i1> %m, i32 %evl)184  ret <16 x float> %v185}186 187define <16 x float> @vfrdiv_vf_v16f32_unmasked(<16 x float> %va, float %b, i32 zeroext %evl) {188; CHECK-LABEL: vfrdiv_vf_v16f32_unmasked:189; CHECK:       # %bb.0:190; CHECK-NEXT:    vsetvli zero, a0, e32, m4, ta, ma191; CHECK-NEXT:    vfrdiv.vf v8, v8, fa0192; CHECK-NEXT:    ret193  %elt.head = insertelement <16 x float> poison, float %b, i32 0194  %vb = shufflevector <16 x float> %elt.head, <16 x float> poison, <16 x i32> zeroinitializer195  %v = call <16 x float> @llvm.vp.fdiv.v16f32(<16 x float> %vb, <16 x float> %va, <16 x i1> splat (i1 true), i32 %evl)196  ret <16 x float> %v197}198 199define <2 x double> @vfrdiv_vf_v2f64(<2 x double> %va, double %b, <2 x i1> %m, i32 zeroext %evl) {200; CHECK-LABEL: vfrdiv_vf_v2f64:201; CHECK:       # %bb.0:202; CHECK-NEXT:    vsetvli zero, a0, e64, m1, ta, ma203; CHECK-NEXT:    vfrdiv.vf v8, v8, fa0, v0.t204; CHECK-NEXT:    ret205  %elt.head = insertelement <2 x double> poison, double %b, i32 0206  %vb = shufflevector <2 x double> %elt.head, <2 x double> poison, <2 x i32> zeroinitializer207  %v = call <2 x double> @llvm.vp.fdiv.v2f64(<2 x double> %vb, <2 x double> %va, <2 x i1> %m, i32 %evl)208  ret <2 x double> %v209}210 211define <2 x double> @vfrdiv_vf_v2f64_unmasked(<2 x double> %va, double %b, i32 zeroext %evl) {212; CHECK-LABEL: vfrdiv_vf_v2f64_unmasked:213; CHECK:       # %bb.0:214; CHECK-NEXT:    vsetvli zero, a0, e64, m1, ta, ma215; CHECK-NEXT:    vfrdiv.vf v8, v8, fa0216; CHECK-NEXT:    ret217  %elt.head = insertelement <2 x double> poison, double %b, i32 0218  %vb = shufflevector <2 x double> %elt.head, <2 x double> poison, <2 x i32> zeroinitializer219  %v = call <2 x double> @llvm.vp.fdiv.v2f64(<2 x double> %vb, <2 x double> %va, <2 x i1> splat (i1 true), i32 %evl)220  ret <2 x double> %v221}222 223define <4 x double> @vfrdiv_vf_v4f64(<4 x double> %va, double %b, <4 x i1> %m, i32 zeroext %evl) {224; CHECK-LABEL: vfrdiv_vf_v4f64:225; CHECK:       # %bb.0:226; CHECK-NEXT:    vsetvli zero, a0, e64, m2, ta, ma227; CHECK-NEXT:    vfrdiv.vf v8, v8, fa0, v0.t228; CHECK-NEXT:    ret229  %elt.head = insertelement <4 x double> poison, double %b, i32 0230  %vb = shufflevector <4 x double> %elt.head, <4 x double> poison, <4 x i32> zeroinitializer231  %v = call <4 x double> @llvm.vp.fdiv.v4f64(<4 x double> %vb, <4 x double> %va, <4 x i1> %m, i32 %evl)232  ret <4 x double> %v233}234 235define <4 x double> @vfrdiv_vf_v4f64_unmasked(<4 x double> %va, double %b, i32 zeroext %evl) {236; CHECK-LABEL: vfrdiv_vf_v4f64_unmasked:237; CHECK:       # %bb.0:238; CHECK-NEXT:    vsetvli zero, a0, e64, m2, ta, ma239; CHECK-NEXT:    vfrdiv.vf v8, v8, fa0240; CHECK-NEXT:    ret241  %elt.head = insertelement <4 x double> poison, double %b, i32 0242  %vb = shufflevector <4 x double> %elt.head, <4 x double> poison, <4 x i32> zeroinitializer243  %v = call <4 x double> @llvm.vp.fdiv.v4f64(<4 x double> %vb, <4 x double> %va, <4 x i1> splat (i1 true), i32 %evl)244  ret <4 x double> %v245}246 247define <8 x double> @vfrdiv_vf_v8f64(<8 x double> %va, double %b, <8 x i1> %m, i32 zeroext %evl) {248; CHECK-LABEL: vfrdiv_vf_v8f64:249; CHECK:       # %bb.0:250; CHECK-NEXT:    vsetvli zero, a0, e64, m4, ta, ma251; CHECK-NEXT:    vfrdiv.vf v8, v8, fa0, v0.t252; CHECK-NEXT:    ret253  %elt.head = insertelement <8 x double> poison, double %b, i32 0254  %vb = shufflevector <8 x double> %elt.head, <8 x double> poison, <8 x i32> zeroinitializer255  %v = call <8 x double> @llvm.vp.fdiv.v8f64(<8 x double> %vb, <8 x double> %va, <8 x i1> %m, i32 %evl)256  ret <8 x double> %v257}258 259define <8 x double> @vfrdiv_vf_v8f64_unmasked(<8 x double> %va, double %b, i32 zeroext %evl) {260; CHECK-LABEL: vfrdiv_vf_v8f64_unmasked:261; CHECK:       # %bb.0:262; CHECK-NEXT:    vsetvli zero, a0, e64, m4, ta, ma263; CHECK-NEXT:    vfrdiv.vf v8, v8, fa0264; CHECK-NEXT:    ret265  %elt.head = insertelement <8 x double> poison, double %b, i32 0266  %vb = shufflevector <8 x double> %elt.head, <8 x double> poison, <8 x i32> zeroinitializer267  %v = call <8 x double> @llvm.vp.fdiv.v8f64(<8 x double> %vb, <8 x double> %va, <8 x i1> splat (i1 true), i32 %evl)268  ret <8 x double> %v269}270 271define <16 x double> @vfrdiv_vf_v16f64(<16 x double> %va, double %b, <16 x i1> %m, i32 zeroext %evl) {272; CHECK-LABEL: vfrdiv_vf_v16f64:273; CHECK:       # %bb.0:274; CHECK-NEXT:    vsetvli zero, a0, e64, m8, ta, ma275; CHECK-NEXT:    vfrdiv.vf v8, v8, fa0, v0.t276; CHECK-NEXT:    ret277  %elt.head = insertelement <16 x double> poison, double %b, i32 0278  %vb = shufflevector <16 x double> %elt.head, <16 x double> poison, <16 x i32> zeroinitializer279  %v = call <16 x double> @llvm.vp.fdiv.v16f64(<16 x double> %vb, <16 x double> %va, <16 x i1> %m, i32 %evl)280  ret <16 x double> %v281}282 283define <16 x double> @vfrdiv_vf_v16f64_unmasked(<16 x double> %va, double %b, i32 zeroext %evl) {284; CHECK-LABEL: vfrdiv_vf_v16f64_unmasked:285; CHECK:       # %bb.0:286; CHECK-NEXT:    vsetvli zero, a0, e64, m8, ta, ma287; CHECK-NEXT:    vfrdiv.vf v8, v8, fa0288; CHECK-NEXT:    ret289  %elt.head = insertelement <16 x double> poison, double %b, i32 0290  %vb = shufflevector <16 x double> %elt.head, <16 x double> poison, <16 x i32> zeroinitializer291  %v = call <16 x double> @llvm.vp.fdiv.v16f64(<16 x double> %vb, <16 x double> %va, <16 x i1> splat (i1 true), i32 %evl)292  ret <16 x double> %v293}294