From fb05be00df385ed216fcb9f6712206ec64fed72e Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Tue, 18 Aug 2020 15:11:02 -0700 Subject: [PATCH] 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. --- src/test/codegen/scalar-pair-bool.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/test/codegen/scalar-pair-bool.rs b/src/test/codegen/scalar-pair-bool.rs index d91ee7f816ded..4704c8ad797d8 100644 --- a/src/test/codegen/scalar-pair-bool.rs +++ b/src/test/codegen/scalar-pair-bool.rs @@ -24,8 +24,9 @@ pub fn pair_i32_bool(pair: (i32, bool)) -> (i32, bool) { #[no_mangle] pub fn pair_and_or((a, b): (bool, bool)) -> (bool, bool) { // Make sure it can operate directly on the unpacked args - // CHECK: and i1 %_1.0, %_1.1 - // CHECK: or i1 %_1.0, %_1.1 + // (but it might not be using simple and/or instructions) + // CHECK-DAG: %_1.0 + // CHECK-DAG: %_1.1 (a && b, a || b) }