Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FileCheck annotations to mir-opt/copy-prop #135099

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add FileCheck to move_projection.rs
Signed-off-by: Shunpoco <tkngsnsk313320@gmail.com>
Shunpoco committed Jan 4, 2025

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
commit 334d501f7cdd191fd32eb18b04dabb9d3820a71e
7 changes: 6 additions & 1 deletion tests/mir-opt/copy-prop/move_projection.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// skip-filecheck
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
//@ test-mir-pass: CopyProp

@@ -15,6 +14,12 @@ struct Foo(u8);

#[custom_mir(dialect = "runtime")]
fn f(a: Foo) -> bool {
// CHECK-LABEL: fn f(
// CHECK-SAME: [[a:_.*]]: Foo)
// CHECK: bb0: {
// CHECK-NOT: _2 = copy [[a]];
// CHECK-NOT: _3 = move (_2.0: u8);
// CHECK: _3 = copy ([[a]].0: u8);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add the CHECK: _0 = opaque(copy [[a]]) and CHECK: _0 = opaque(move _3)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 6eab7c7

mir! {
{
let b = a;