Skip to content

Commit 0c7e706

Browse files
committed
[AArch64] Pre-commit another test case for #90936. NFC
Another similar problem was added to the ticket after the first fix.
1 parent a441645 commit 0c7e706

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

llvm/test/CodeGen/AArch64/pr90936.ll

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,28 @@ bb:
1818
store i8 %i5, ptr %i4, align 1
1919
ret void
2020
}
21+
22+
define void @g(i32 %arg, ptr %arg1) {
23+
; CHECK-LABEL: g:
24+
; CHECK: // %bb.0: // %bb
25+
; CHECK-NEXT: and w8, w0, #0xff
26+
; CHECK-NEXT: str w8, [x1]
27+
; CHECK-NEXT: ret
28+
bb:
29+
%i = trunc i32 %arg to i8
30+
store i8 %i, ptr %arg1, align 1
31+
%i2 = lshr i32 %arg, 8
32+
%i3 = trunc i32 %i2 to i8
33+
%i4 = getelementptr i8, ptr %arg1, i64 1
34+
store i8 %i3, ptr %i4, align 1
35+
%i5 = lshr i32 %arg, 16
36+
%i6 = trunc i32 %i5 to i8
37+
%i7 = getelementptr i8, ptr %arg1, i64 2
38+
store i8 %i6, ptr %i7, align 1
39+
%i8 = zext i8 %i to i32
40+
%i9 = lshr i32 %i8, 24
41+
%i10 = getelementptr i8, ptr %arg1, i64 3
42+
%i11 = trunc i32 %i9 to i8
43+
store i8 %i11, ptr %i10, align 1
44+
ret void
45+
}

0 commit comments

Comments
 (0)