Skip to content

Commit 7542477

Browse files
committed
[CodeGen] Precommit tests for D157095
1 parent a2132d7 commit 7542477

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

llvm/test/CodeGen/AArch64/sve-fp-combine.ll

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1298,6 +1298,39 @@ define <vscale x 2 x double> @fma_sel_d_different_arg_order(<vscale x 2 x i1> %p
12981298
ret <vscale x 2 x double> %masked.mul.add
12991299
}
13001300

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+
13011334
declare <vscale x 8 x half> @llvm.fma.nxv8f16(<vscale x 8 x half>, <vscale x 8 x half>, <vscale x 8 x half>)
13021335
declare <vscale x 4 x float> @llvm.fma.nxv4f32(<vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float>)
13031336
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

Comments
 (0)