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
+33Lines changed: 33 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1298,6 +1298,39 @@ define <vscale x 2 x double> @fma_sel_d_different_arg_order(<vscale x 2 x i1> %p
1298
1298
ret <vscale x 2 x double> %masked.mul.add
1299
1299
}
1300
1300
1301
+
define <vscale x 8 x half> @fnma_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) {
1302
+
; CHECK-LABEL: fnma_sel_h_different_arg_order:
1303
+
; CHECK: // %bb.0:
1304
+
; CHECK-NEXT: fmsb z0.h, p0/m, z1.h, z2.h
1305
+
; CHECK-NEXT: ret
1306
+
%neg_m1 = fneg contract <vscale x 8 x half> %m1
1307
+
%mul.add = call <vscale x 8 x half> @llvm.fma.nxv8f16(<vscale x 8 x half> %neg_m1, <vscale x 8 x half> %m2, <vscale x 8 x half> %acc)
1308
+
%masked.mul.add = select <vscale x 8 x i1> %pred, <vscale x 8 x half> %mul.add, <vscale x 8 x half> %acc
1309
+
ret <vscale x 8 x half> %masked.mul.add
1310
+
}
1311
+
1312
+
define <vscale x 4 x float> @fnma_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) {
1313
+
; CHECK-LABEL: fnma_sel_s_different_arg_order:
1314
+
; CHECK: // %bb.0:
1315
+
; CHECK-NEXT: fmsb z0.s, p0/m, z1.s, z2.s
1316
+
; CHECK-NEXT: ret
1317
+
%neg_m1 = fneg contract <vscale x 4 x float> %m1
1318
+
%mul.add = call <vscale x 4 x float> @llvm.fma.nxv4f32(<vscale x 4 x float> %neg_m1, <vscale x 4 x float> %m2, <vscale x 4 x float> %acc)
1319
+
%masked.mul.add = select <vscale x 4 x i1> %pred, <vscale x 4 x float> %mul.add, <vscale x 4 x float> %acc
1320
+
ret <vscale x 4 x float> %masked.mul.add
1321
+
}
1322
+
1323
+
define <vscale x 2 x double> @fnma_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) {
1324
+
; CHECK-LABEL: fnma_sel_d_different_arg_order:
1325
+
; CHECK: // %bb.0:
1326
+
; CHECK-NEXT: fmsb z0.d, p0/m, z1.d, z2.d
1327
+
; CHECK-NEXT: ret
1328
+
%neg_m1 = fneg contract <vscale x 2 x double> %m1
1329
+
%mul.add = call <vscale x 2 x double> @llvm.fma.nxv2f64(<vscale x 2 x double> %neg_m1, <vscale x 2 x double> %m2, <vscale x 2 x double> %acc)
1330
+
%masked.mul.add = select <vscale x 2 x i1> %pred, <vscale x 2 x double> %mul.add, <vscale x 2 x double> %acc
1331
+
ret <vscale x 2 x double> %masked.mul.add
1332
+
}
1333
+
1301
1334
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
1335
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
1336
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