Skip to content

Commit b987aa5

Browse files
committed
Repro for the LLVM assertion
1 parent 5e6ae8b commit b987aa5

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

tests/codegen/intrinsics/disjoint_bitor.rs

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ compile-flags: -C no-prepopulate-passes
1+
//@ compile-flags: -C no-prepopulate-passes -Z mir-opt-level=0
22

33
#![crate_type = "lib"]
44
#![feature(core_intrinsics)]
@@ -18,3 +18,13 @@ pub unsafe fn disjoint_bitor_unsigned(x: u64, y: u64) -> u64 {
1818
// CHECK: or disjoint i64 %x, %y
1919
disjoint_bitor(x, y)
2020
}
21+
22+
// CHECK-LABEL: @disjoint_bitor_literal
23+
#[no_mangle]
24+
pub unsafe fn disjoint_bitor_literal() -> u8 {
25+
// This is a separate check because even without any passes,
26+
// LLVM will fold so it's not an instruction, which can assert in LLVM.
27+
28+
// CHECK: store i8 3
29+
disjoint_bitor(1, 2)
30+
}

0 commit comments

Comments
 (0)