about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2020-08-18 15:11:02 -0700
committerJosh Stone <jistone@redhat.com>2020-08-22 13:44:54 -0700
commitfb05be00df385ed216fcb9f6712206ec64fed72e (patch)
tree8e944efec8383ad535ae54c19c81b765b95b5854
parent5c87749a271f82ab269603ade13867ffd50778ec (diff)
downloadrust-fb05be00df385ed216fcb9f6712206ec64fed72e.tar.gz
rust-fb05be00df385ed216fcb9f6712206ec64fed72e.zip
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.
-rw-r--r--src/test/codegen/scalar-pair-bool.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/test/codegen/scalar-pair-bool.rs b/src/test/codegen/scalar-pair-bool.rs
index d91ee7f816d..4704c8ad797 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)
 }