1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4
2 ; RUN: llc < %s -mtriple=aarch64 | FileCheck %s
4 define void @f(i16 %arg, ptr %arg1) {
7 ; CHECK-NEXT: ubfx w8, w0, #8, #6
8 ; CHECK-NEXT: strb w0, [x1]
9 ; CHECK-NEXT: strb w8, [x1, #1]
12 %i = trunc i16 %arg to i8
13 %i2 = trunc i16 %arg to i14
15 store i8 %i, ptr %arg1, align 1
16 %i4 = getelementptr i8, ptr %arg1, i64 1
17 %i5 = trunc i14 %i3 to i8
18 store i8 %i5, ptr %i4, align 1
22 define void @g(i32 %arg, ptr %arg1) {
24 ; CHECK: // %bb.0: // %bb
25 ; CHECK-NEXT: lsr w8, w0, #8
26 ; CHECK-NEXT: lsr w9, w0, #16
27 ; CHECK-NEXT: strb w0, [x1]
28 ; CHECK-NEXT: strb wzr, [x1, #3]
29 ; CHECK-NEXT: strb w8, [x1, #1]
30 ; CHECK-NEXT: strb w9, [x1, #2]
33 %i = trunc i32 %arg to i8
34 store i8 %i, ptr %arg1, align 1
35 %i2 = lshr i32 %arg, 8
36 %i3 = trunc i32 %i2 to i8
37 %i4 = getelementptr i8, ptr %arg1, i64 1
38 store i8 %i3, ptr %i4, align 1
39 %i5 = lshr i32 %arg, 16
40 %i6 = trunc i32 %i5 to i8
41 %i7 = getelementptr i8, ptr %arg1, i64 2
42 store i8 %i6, ptr %i7, align 1
43 %i8 = zext i8 %i to i32
44 %i9 = lshr i32 %i8, 24
45 %i10 = getelementptr i8, ptr %arg1, i64 3
46 %i11 = trunc i32 %i9 to i8
47 store i8 %i11, ptr %i10, align 1