|
18 | 18 | store i8 %i5, ptr %i4, align 1
|
19 | 19 | ret void
|
20 | 20 | }
|
| 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