Skip to content

Commit fb05be0

Browse files
committed
Match scalar-pair-bool more flexibly for LLVM 11
LLVM 11 started using `phi` and `select` for `fn pair_i32_bool`, which is still valid, but harder to match than the simple instructions we were getting before. We'll just check that the unpacked args are directly referenced in any way, and call it good.
1 parent 5c87749 commit fb05be0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/test/codegen/scalar-pair-bool.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ pub fn pair_i32_bool(pair: (i32, bool)) -> (i32, bool) {
2424
#[no_mangle]
2525
pub fn pair_and_or((a, b): (bool, bool)) -> (bool, bool) {
2626
// Make sure it can operate directly on the unpacked args
27-
// CHECK: and i1 %_1.0, %_1.1
28-
// CHECK: or i1 %_1.0, %_1.1
27+
// (but it might not be using simple and/or instructions)
28+
// CHECK-DAG: %_1.0
29+
// CHECK-DAG: %_1.1
2930
(a && b, a || b)
3031
}
3132

0 commit comments

Comments
 (0)