Skip to content

Commit 6f2345a

Browse files
[LLVM][AArch64] Change SVE CodeGen tests to use splat().
The affected tests were using the longwinded syntax for constant splats. By using the splat() syntax the tests get simplified whilst also removing the need for "undef".
1 parent 5756568 commit 6f2345a

13 files changed

+318
-702
lines changed

llvm/test/CodeGen/AArch64/pr49781.ll

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ define <vscale x 2 x i64> @foo(<vscale x 2 x i64> %a) {
66
; CHECK: // %bb.0:
77
; CHECK-NEXT: sub z0.d, z0.d, #2 // =0x2
88
; CHECK-NEXT: ret
9-
%idx = shufflevector <vscale x 2 x i64> insertelement (<vscale x 2 x i64> undef, i64 1, i32 0), <vscale x 2 x i64> zeroinitializer, <vscale x 2 x i32> zeroinitializer
10-
%b = sub <vscale x 2 x i64> %a, %idx
11-
%c = sub <vscale x 2 x i64> %b, %idx
9+
%b = sub <vscale x 2 x i64> %a, splat (i64 1)
10+
%c = sub <vscale x 2 x i64> %b, splat (i64 1)
1211
ret <vscale x 2 x i64> %c
1312
}

0 commit comments

Comments
 (0)