|
14 | 14 |
|
15 | 15 | // This checks the constants from {low,high}_align_const, they share the same |
16 | 16 | // constant, but the alignment differs, so the higher one should be used |
17 | | -// CHECK: [[LOW_HIGH:@[0-9]+]] = {{.*}} getelementptr inbounds (<{ [8 x i8] }>, <{ [8 x i8] }>* @alloc20, i32 0, i32 0, i32 0), {{.*}} |
| 17 | +// CHECK: [[LOW_HIGH:@alloc[0-9]+]] = {{.*}}, align 4 |
18 | 18 |
|
19 | 19 | #[derive(Copy, Clone)] |
20 | 20 | // repr(i16) is required for the {low,high}_align_const test |
@@ -43,14 +43,14 @@ pub fn inline_enum_const() -> E<i8, i16> { |
43 | 43 | #[no_mangle] |
44 | 44 | pub fn low_align_const() -> E<i16, [i16; 3]> { |
45 | 45 | // Check that low_align_const and high_align_const use the same constant |
46 | | - // CHECK: load %"E<i16, [i16; 3]>"*, %"E<i16, [i16; 3]>"** bitcast (<{ i8*, [0 x i8] }>* [[LOW_HIGH]] to %"E<i16, [i16; 3]>"**), |
| 46 | + // CHECK: memcpy.p0i8.p0i8.i64(i8* align 2 %1, i8* align 2 getelementptr inbounds (<{ [8 x i8] }>, <{ [8 x i8] }>* [[LOW_HIGH]], i32 0, i32 0, i32 0), i64 8, i1 false) |
47 | 47 | *&E::A(0) |
48 | 48 | } |
49 | 49 |
|
50 | 50 | // CHECK-LABEL: @high_align_const |
51 | 51 | #[no_mangle] |
52 | 52 | pub fn high_align_const() -> E<i16, i32> { |
53 | 53 | // Check that low_align_const and high_align_const use the same constant |
54 | | - // CHECK: load %"E<i16, i32>"*, %"E<i16, i32>"** bitcast (<{ i8*, [0 x i8] }>* [[LOW_HIGH]] to %"E<i16, i32>"**), |
| 54 | + // CHECK: memcpy.p0i8.p0i8.i64(i8* align 4 %1, i8* align 4 getelementptr inbounds (<{ [8 x i8] }>, <{ [8 x i8] }>* [[LOW_HIGH]], i32 0, i32 0, i32 0), i64 8, i1 false) |
55 | 55 | *&E::A(0) |
56 | 56 | } |
0 commit comments