Add FileCheck to branch.rs

This commit is contained in:
Shunpoco
2025-01-04 11:18:22 +00:00
parent a8664a1534
commit e36689aea7
+8 -1
View File
@@ -1,4 +1,3 @@
// skip-filecheck
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
//! Tests that we bail out when there are multiple assignments to the same local.
//@ test-mir-pass: CopyProp
@@ -12,6 +11,14 @@ fn cond() -> bool {
// EMIT_MIR branch.foo.CopyProp.diff
fn foo() -> i32 {
// CHECK-LABEL: fn foo(
// CHECK: debug x => [[x:_.*]];
// CHECK: debug y => [[y:_.*]];
// CHECK: bb3: {
// CHECK: [[y]] = copy [[x]];
// CHECK: bb5: {
// CHECK: [[y]] = copy [[x]];
// CHECK: _0 = copy [[y]];
let x = val();
let y = if cond() {