Skip to content

Commit ce2d91d

Browse files
committed
Directly use volatile_load intrinsic
This makes the test work if libstd is compiled with debug assertions.
1 parent 7a0415c commit ce2d91d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/codegen/i128-x86-align.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// CHECK: %ScalarPair = type { i32, [3 x i32], i128 }
99
// CHECK: %Struct = type { i32, i32, [2 x i32], i128 }
1010

11+
#![feature(core_intrinsics)]
12+
1113
#[repr(C)]
1214
#[derive(Clone, Copy)]
1315
pub struct ScalarPair {
@@ -59,7 +61,7 @@ pub fn load_volatile(x: &ScalarPair) -> ScalarPair {
5961
// CHECK-NEXT: [[A:%.*]] = load i32, ptr [[TMP]], align 16
6062
// CHECK-NEXT: [[GEP:%.*]] = getelementptr inbounds i8, ptr [[TMP]], i64 16
6163
// CHECK-NEXT: [[B:%.*]] = load i128, ptr [[GEP]], align 16
62-
unsafe { std::ptr::read_volatile(x) }
64+
unsafe { std::intrinsics::volatile_load(x) }
6365
}
6466

6567
#[no_mangle]

0 commit comments

Comments
 (0)