You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: llvm/test/CodeGen/AArch64/sve-fp-combine.ll
+34Lines changed: 34 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1267,3 +1267,37 @@ define <vscale x 4 x float> @fadd_sel_fmul_no_contract_s(<vscale x 4 x float> %a
1267
1267
%fadd = fadd nsz <vscale x 4 x float> %a, %sel
1268
1268
ret <vscale x 4 x float> %fadd
1269
1269
}
1270
+
1271
+
define <vscale x 8 x half> @fma_sel_h_different_arg_order(<vscale x 8 x i1> %pred, <vscale x 8 x half> %m1, <vscale x 8 x half> %m2, <vscale x 8 x half> %acc) {
1272
+
; CHECK-LABEL: fma_sel_h_different_arg_order:
1273
+
; CHECK: // %bb.0:
1274
+
; CHECK-NEXT: fmad z0.h, p0/m, z1.h, z2.h
1275
+
; CHECK-NEXT: ret
1276
+
%mul.add = call <vscale x 8 x half> @llvm.fma.nxv8f16(<vscale x 8 x half> %m1, <vscale x 8 x half> %m2, <vscale x 8 x half> %acc)
1277
+
%masked.mul.add = select <vscale x 8 x i1> %pred, <vscale x 8 x half> %mul.add, <vscale x 8 x half> %acc
1278
+
ret <vscale x 8 x half> %masked.mul.add
1279
+
}
1280
+
1281
+
define <vscale x 4 x float> @fma_sel_s_different_arg_order(<vscale x 4 x i1> %pred, <vscale x 4 x float> %m1, <vscale x 4 x float> %m2, <vscale x 4 x float> %acc) {
1282
+
; CHECK-LABEL: fma_sel_s_different_arg_order:
1283
+
; CHECK: // %bb.0:
1284
+
; CHECK-NEXT: fmad z0.s, p0/m, z1.s, z2.s
1285
+
; CHECK-NEXT: ret
1286
+
%mul.add = call <vscale x 4 x float> @llvm.fma.nxv4f32(<vscale x 4 x float> %m1, <vscale x 4 x float> %m2, <vscale x 4 x float> %acc)
1287
+
%masked.mul.add = select <vscale x 4 x i1> %pred, <vscale x 4 x float> %mul.add, <vscale x 4 x float> %acc
1288
+
ret <vscale x 4 x float> %masked.mul.add
1289
+
}
1290
+
1291
+
define <vscale x 2 x double> @fma_sel_d_different_arg_order(<vscale x 2 x i1> %pred, <vscale x 2 x double> %m1, <vscale x 2 x double> %m2, <vscale x 2 x double> %acc) {
1292
+
; CHECK-LABEL: fma_sel_d_different_arg_order:
1293
+
; CHECK: // %bb.0:
1294
+
; CHECK-NEXT: fmad z0.d, p0/m, z1.d, z2.d
1295
+
; CHECK-NEXT: ret
1296
+
%mul.add = call <vscale x 2 x double> @llvm.fma.nxv2f64(<vscale x 2 x double> %m1, <vscale x 2 x double> %m2, <vscale x 2 x double> %acc)
1297
+
%masked.mul.add = select <vscale x 2 x i1> %pred, <vscale x 2 x double> %mul.add, <vscale x 2 x double> %acc
1298
+
ret <vscale x 2 x double> %masked.mul.add
1299
+
}
1300
+
1301
+
declare <vscale x 8 x half> @llvm.fma.nxv8f16(<vscale x 8 x half>, <vscale x 8 x half>, <vscale x 8 x half>)
1302
+
declare <vscale x 4 x float> @llvm.fma.nxv4f32(<vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float>)
1303
+
declare <vscale x 2 x double> @llvm.fma.nxv2f64(<vscale x 2 x double>, <vscale x 2 x double>, <vscale x 2 x double>)
0 commit comments