|
| 1 | +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4 |
| 2 | +; RUN: opt -expandvp -S < %s | FileCheck %s |
| 3 | + |
| 4 | +define void @vp_fadd_v4f32(<4 x float> %a0, <4 x float> %a1, ptr %out, i32 %vp) nounwind { |
| 5 | +; CHECK-LABEL: define void @vp_fadd_v4f32( |
| 6 | +; CHECK-SAME: <4 x float> [[A0:%.*]], <4 x float> [[A1:%.*]], ptr [[OUT:%.*]], i32 [[VP:%.*]]) #[[ATTR0:[0-9]+]] { |
| 7 | +; CHECK-NEXT: [[RES1:%.*]] = fadd <4 x float> [[A0]], [[A1]] |
| 8 | +; CHECK-NEXT: store <4 x float> [[RES1]], ptr [[OUT]], align 16 |
| 9 | +; CHECK-NEXT: ret void |
| 10 | +; |
| 11 | + %res = call <4 x float> @llvm.vp.fadd.v4f32(<4 x float> %a0, <4 x float> %a1, <4 x i1> <i1 -1, i1 -1, i1 -1, i1 -1>, i32 %vp) |
| 12 | + store <4 x float> %res, ptr %out |
| 13 | + ret void |
| 14 | +} |
| 15 | +declare <4 x float> @llvm.vp.fadd.v4f32(<4 x float>, <4 x float>, <4 x i1>, i32) |
| 16 | + |
| 17 | +define void @vp_fsub_v4f32(<4 x float> %a0, <4 x float> %a1, ptr %out, i32 %vp) nounwind { |
| 18 | +; CHECK-LABEL: define void @vp_fsub_v4f32( |
| 19 | +; CHECK-SAME: <4 x float> [[A0:%.*]], <4 x float> [[A1:%.*]], ptr [[OUT:%.*]], i32 [[VP:%.*]]) #[[ATTR0]] { |
| 20 | +; CHECK-NEXT: [[RES1:%.*]] = fsub <4 x float> [[A0]], [[A1]] |
| 21 | +; CHECK-NEXT: store <4 x float> [[RES1]], ptr [[OUT]], align 16 |
| 22 | +; CHECK-NEXT: ret void |
| 23 | +; |
| 24 | + %res = call <4 x float> @llvm.vp.fsub.v4f32(<4 x float> %a0, <4 x float> %a1, <4 x i1> <i1 -1, i1 -1, i1 -1, i1 -1>, i32 %vp) |
| 25 | + store <4 x float> %res, ptr %out |
| 26 | + ret void |
| 27 | +} |
| 28 | +declare <4 x float> @llvm.vp.fsub.v4f32(<4 x float>, <4 x float>, <4 x i1>, i32) |
| 29 | + |
| 30 | +define void @vp_fmul_v4f32(<4 x float> %a0, <4 x float> %a1, ptr %out, i32 %vp) nounwind { |
| 31 | +; CHECK-LABEL: define void @vp_fmul_v4f32( |
| 32 | +; CHECK-SAME: <4 x float> [[A0:%.*]], <4 x float> [[A1:%.*]], ptr [[OUT:%.*]], i32 [[VP:%.*]]) #[[ATTR0]] { |
| 33 | +; CHECK-NEXT: [[RES1:%.*]] = fmul <4 x float> [[A0]], [[A1]] |
| 34 | +; CHECK-NEXT: store <4 x float> [[RES1]], ptr [[OUT]], align 16 |
| 35 | +; CHECK-NEXT: ret void |
| 36 | +; |
| 37 | + %res = call <4 x float> @llvm.vp.fmul.v4f32(<4 x float> %a0, <4 x float> %a1, <4 x i1> <i1 -1, i1 -1, i1 -1, i1 -1>, i32 %vp) |
| 38 | + store <4 x float> %res, ptr %out |
| 39 | + ret void |
| 40 | +} |
| 41 | +declare <4 x float> @llvm.vp.fmul.v4f32(<4 x float>, <4 x float>, <4 x i1>, i32) |
| 42 | + |
| 43 | +define void @vp_fdiv_v4f32(<4 x float> %a0, <4 x float> %a1, ptr %out, i32 %vp) nounwind { |
| 44 | +; CHECK-LABEL: define void @vp_fdiv_v4f32( |
| 45 | +; CHECK-SAME: <4 x float> [[A0:%.*]], <4 x float> [[A1:%.*]], ptr [[OUT:%.*]], i32 [[VP:%.*]]) #[[ATTR0]] { |
| 46 | +; CHECK-NEXT: [[RES1:%.*]] = fdiv <4 x float> [[A0]], [[A1]] |
| 47 | +; CHECK-NEXT: store <4 x float> [[RES1]], ptr [[OUT]], align 16 |
| 48 | +; CHECK-NEXT: ret void |
| 49 | +; |
| 50 | + %res = call <4 x float> @llvm.vp.fdiv.v4f32(<4 x float> %a0, <4 x float> %a1, <4 x i1> <i1 -1, i1 -1, i1 -1, i1 -1>, i32 %vp) |
| 51 | + store <4 x float> %res, ptr %out |
| 52 | + ret void |
| 53 | +} |
| 54 | +declare <4 x float> @llvm.vp.fdiv.v4f32(<4 x float>, <4 x float>, <4 x i1>, i32) |
| 55 | + |
| 56 | +define void @vp_frem_v4f32(<4 x float> %a0, <4 x float> %a1, ptr %out, i32 %vp) nounwind { |
| 57 | +; CHECK-LABEL: define void @vp_frem_v4f32( |
| 58 | +; CHECK-SAME: <4 x float> [[A0:%.*]], <4 x float> [[A1:%.*]], ptr [[OUT:%.*]], i32 [[VP:%.*]]) #[[ATTR0]] { |
| 59 | +; CHECK-NEXT: [[RES1:%.*]] = frem <4 x float> [[A0]], [[A1]] |
| 60 | +; CHECK-NEXT: store <4 x float> [[RES1]], ptr [[OUT]], align 16 |
| 61 | +; CHECK-NEXT: ret void |
| 62 | +; |
| 63 | + %res = call <4 x float> @llvm.vp.frem.v4f32(<4 x float> %a0, <4 x float> %a1, <4 x i1> <i1 -1, i1 -1, i1 -1, i1 -1>, i32 %vp) |
| 64 | + store <4 x float> %res, ptr %out |
| 65 | + ret void |
| 66 | +} |
| 67 | +declare <4 x float> @llvm.vp.frem.v4f32(<4 x float>, <4 x float>, <4 x i1>, i32) |
| 68 | + |
| 69 | +define void @vp_fabs_v4f32(<4 x float> %a0, <4 x float> %a1, ptr %out, i32 %vp) nounwind { |
| 70 | +; CHECK-LABEL: define void @vp_fabs_v4f32( |
| 71 | +; CHECK-SAME: <4 x float> [[A0:%.*]], <4 x float> [[A1:%.*]], ptr [[OUT:%.*]], i32 [[VP:%.*]]) #[[ATTR0]] { |
| 72 | +; CHECK-NEXT: [[RES1:%.*]] = call <4 x float> @llvm.fabs.v4f32(<4 x float> [[A0]]) |
| 73 | +; CHECK-NEXT: store <4 x float> [[RES1]], ptr [[OUT]], align 16 |
| 74 | +; CHECK-NEXT: ret void |
| 75 | +; |
| 76 | + %res = call <4 x float> @llvm.vp.fabs.v4f32(<4 x float> %a0, <4 x i1> <i1 -1, i1 -1, i1 -1, i1 -1>, i32 %vp) |
| 77 | + store <4 x float> %res, ptr %out |
| 78 | + ret void |
| 79 | +} |
| 80 | +declare <4 x float> @llvm.vp.fabs.v4f32(<4 x float>, <4 x i1>, i32) |
| 81 | + |
| 82 | +define void @vp_sqrt_v4f32(<4 x float> %a0, <4 x float> %a1, ptr %out, i32 %vp) nounwind { |
| 83 | +; CHECK-LABEL: define void @vp_sqrt_v4f32( |
| 84 | +; CHECK-SAME: <4 x float> [[A0:%.*]], <4 x float> [[A1:%.*]], ptr [[OUT:%.*]], i32 [[VP:%.*]]) #[[ATTR0]] { |
| 85 | +; CHECK-NEXT: [[RES1:%.*]] = call <4 x float> @llvm.sqrt.v4f32(<4 x float> [[A0]]) |
| 86 | +; CHECK-NEXT: store <4 x float> [[RES1]], ptr [[OUT]], align 16 |
| 87 | +; CHECK-NEXT: ret void |
| 88 | +; |
| 89 | + %res = call <4 x float> @llvm.vp.sqrt.v4f32(<4 x float> %a0, <4 x i1> <i1 -1, i1 -1, i1 -1, i1 -1>, i32 %vp) |
| 90 | + store <4 x float> %res, ptr %out |
| 91 | + ret void |
| 92 | +} |
| 93 | +declare <4 x float> @llvm.vp.sqrt.v4f32(<4 x float>, <4 x i1>, i32) |
| 94 | + |
| 95 | +define void @vp_fneg_v4f32(<4 x float> %a0, <4 x float> %a1, ptr %out, i32 %vp) nounwind { |
| 96 | +; CHECK-LABEL: define void @vp_fneg_v4f32( |
| 97 | +; CHECK-SAME: <4 x float> [[A0:%.*]], <4 x float> [[A1:%.*]], ptr [[OUT:%.*]], i32 [[VP:%.*]]) #[[ATTR0]] { |
| 98 | +; CHECK-NEXT: [[RES1:%.*]] = fneg <4 x float> [[A0]] |
| 99 | +; CHECK-NEXT: store <4 x float> [[RES1]], ptr [[OUT]], align 16 |
| 100 | +; CHECK-NEXT: ret void |
| 101 | +; |
| 102 | + %res = call <4 x float> @llvm.vp.fneg.v4f32(<4 x float> %a0, <4 x i1> <i1 -1, i1 -1, i1 -1, i1 -1>, i32 %vp) |
| 103 | + store <4 x float> %res, ptr %out |
| 104 | + ret void |
| 105 | +} |
| 106 | +declare <4 x float> @llvm.vp.fneg.v4f32(<4 x float>, <4 x i1>, i32) |
| 107 | + |
| 108 | +define void @vp_fma_v4f32(<4 x float> %a0, <4 x float> %a1, ptr %out, i4 %a5) nounwind { |
| 109 | +; CHECK-LABEL: define void @vp_fma_v4f32( |
| 110 | +; CHECK-SAME: <4 x float> [[A0:%.*]], <4 x float> [[A1:%.*]], ptr [[OUT:%.*]], i4 [[A5:%.*]]) #[[ATTR0]] { |
| 111 | +; CHECK-NEXT: [[RES1:%.*]] = call <4 x float> @llvm.fma.v4f32(<4 x float> [[A0]], <4 x float> [[A1]], <4 x float> [[A1]]) |
| 112 | +; CHECK-NEXT: store <4 x float> [[RES1]], ptr [[OUT]], align 16 |
| 113 | +; CHECK-NEXT: ret void |
| 114 | +; |
| 115 | + %res = call <4 x float> @llvm.vp.fma.v4f32(<4 x float> %a0, <4 x float> %a1, <4 x float> %a1, <4 x i1> <i1 -1, i1 -1, i1 -1, i1 -1>, i32 4) |
| 116 | + store <4 x float> %res, ptr %out |
| 117 | + ret void |
| 118 | +} |
| 119 | +declare <4 x float> @llvm.vp.fma.v4f32(<4 x float>, <4 x float>, <4 x float>, <4 x i1>, i32) |
| 120 | + |
| 121 | +define void @vp_fmuladd_v4f32(<4 x float> %a0, <4 x float> %a1, ptr %out, i4 %a5) nounwind { |
| 122 | +; CHECK-LABEL: define void @vp_fmuladd_v4f32( |
| 123 | +; CHECK-SAME: <4 x float> [[A0:%.*]], <4 x float> [[A1:%.*]], ptr [[OUT:%.*]], i4 [[A5:%.*]]) #[[ATTR0]] { |
| 124 | +; CHECK-NEXT: [[RES1:%.*]] = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> [[A0]], <4 x float> [[A1]], <4 x float> [[A1]]) |
| 125 | +; CHECK-NEXT: store <4 x float> [[RES1]], ptr [[OUT]], align 16 |
| 126 | +; CHECK-NEXT: ret void |
| 127 | +; |
| 128 | + %res = call <4 x float> @llvm.vp.fmuladd.v4f32(<4 x float> %a0, <4 x float> %a1, <4 x float> %a1, <4 x i1> <i1 -1, i1 -1, i1 -1, i1 -1>, i32 4) |
| 129 | + store <4 x float> %res, ptr %out |
| 130 | + ret void |
| 131 | +} |
| 132 | +declare <4 x float> @llvm.vp.fmuladd.v4f32(<4 x float>, <4 x float>, <4 x float>, <4 x i1>, i32) |
| 133 | + |
| 134 | +declare <4 x float> @llvm.vp.maxnum.v4f32(<4 x float>, <4 x float>, <4 x i1>, i32) |
| 135 | +define <4 x float> @vfmax_vv_v4f32(<4 x float> %va, <4 x float> %vb, <4 x i1> %m, i32 zeroext %evl) { |
| 136 | +; CHECK-LABEL: define <4 x float> @vfmax_vv_v4f32( |
| 137 | +; CHECK-SAME: <4 x float> [[VA:%.*]], <4 x float> [[VB:%.*]], <4 x i1> [[M:%.*]], i32 zeroext [[EVL:%.*]]) { |
| 138 | +; CHECK-NEXT: [[V1:%.*]] = call <4 x float> @llvm.maxnum.v4f32(<4 x float> [[VA]], <4 x float> [[VB]]) |
| 139 | +; CHECK-NEXT: ret <4 x float> [[V1]] |
| 140 | +; |
| 141 | + %v = call <4 x float> @llvm.vp.maxnum.v4f32(<4 x float> %va, <4 x float> %vb, <4 x i1> %m, i32 %evl) |
| 142 | + ret <4 x float> %v |
| 143 | +} |
| 144 | + |
| 145 | +declare <8 x float> @llvm.vp.maxnum.v8f32(<8 x float>, <8 x float>, <8 x i1>, i32) |
| 146 | +define <8 x float> @vfmax_vv_v8f32(<8 x float> %va, <8 x float> %vb, <8 x i1> %m, i32 zeroext %evl) { |
| 147 | +; CHECK-LABEL: define <8 x float> @vfmax_vv_v8f32( |
| 148 | +; CHECK-SAME: <8 x float> [[VA:%.*]], <8 x float> [[VB:%.*]], <8 x i1> [[M:%.*]], i32 zeroext [[EVL:%.*]]) { |
| 149 | +; CHECK-NEXT: [[V1:%.*]] = call <8 x float> @llvm.maxnum.v8f32(<8 x float> [[VA]], <8 x float> [[VB]]) |
| 150 | +; CHECK-NEXT: ret <8 x float> [[V1]] |
| 151 | +; |
| 152 | + %v = call <8 x float> @llvm.vp.maxnum.v8f32(<8 x float> %va, <8 x float> %vb, <8 x i1> %m, i32 %evl) |
| 153 | + ret <8 x float> %v |
| 154 | +} |
| 155 | + |
| 156 | +declare <4 x float> @llvm.vp.minnum.v4f32(<4 x float>, <4 x float>, <4 x i1>, i32) |
| 157 | +define <4 x float> @vfmin_vv_v4f32(<4 x float> %va, <4 x float> %vb, <4 x i1> %m, i32 zeroext %evl) { |
| 158 | +; CHECK-LABEL: define <4 x float> @vfmin_vv_v4f32( |
| 159 | +; CHECK-SAME: <4 x float> [[VA:%.*]], <4 x float> [[VB:%.*]], <4 x i1> [[M:%.*]], i32 zeroext [[EVL:%.*]]) { |
| 160 | +; CHECK-NEXT: [[V1:%.*]] = call <4 x float> @llvm.minnum.v4f32(<4 x float> [[VA]], <4 x float> [[VB]]) |
| 161 | +; CHECK-NEXT: ret <4 x float> [[V1]] |
| 162 | +; |
| 163 | + %v = call <4 x float> @llvm.vp.minnum.v4f32(<4 x float> %va, <4 x float> %vb, <4 x i1> %m, i32 %evl) |
| 164 | + ret <4 x float> %v |
| 165 | +} |
| 166 | + |
| 167 | +declare <8 x float> @llvm.vp.minnum.v8f32(<8 x float>, <8 x float>, <8 x i1>, i32) |
| 168 | +define <8 x float> @vfmin_vv_v8f32(<8 x float> %va, <8 x float> %vb, <8 x i1> %m, i32 zeroext %evl) { |
| 169 | +; CHECK-LABEL: define <8 x float> @vfmin_vv_v8f32( |
| 170 | +; CHECK-SAME: <8 x float> [[VA:%.*]], <8 x float> [[VB:%.*]], <8 x i1> [[M:%.*]], i32 zeroext [[EVL:%.*]]) { |
| 171 | +; CHECK-NEXT: [[V1:%.*]] = call <8 x float> @llvm.minnum.v8f32(<8 x float> [[VA]], <8 x float> [[VB]]) |
| 172 | +; CHECK-NEXT: ret <8 x float> [[V1]] |
| 173 | +; |
| 174 | + %v = call <8 x float> @llvm.vp.minnum.v8f32(<8 x float> %va, <8 x float> %vb, <8 x i1> %m, i32 %evl) |
| 175 | + ret <8 x float> %v |
| 176 | +} |
0 commit comments