Skip to content

Add FileCheck annotations to MIR-opt test simplify_cfg.rs - #164489

Open
rlauff wants to merge 1 commit into
rust-lang:mainfrom
rlauff:filecheck-simplify-cfg
Open

rlauff wants to merge 1 commit into
rust-lang:mainfrom
rlauff:filecheck-simplify-cfg

Conversation

@rlauff

@rlauff rlauff commented Oct 17, 2026 •

Copy link
Copy Markdown

Issue #116971 asks to add FileCheck annotations for tests in tests/mir-opt.
This PR adds them for simplify_cfg.rs.

This test checks that unneeded jumps get simplified away. The FileCheck annotations added establish that the call graph is:

    bar() -> branch on boolean output
        -True -> can jump anywhere, not part of the test
        -False -> jump back to loop with bar() call in it immediately.

LLM disclosure:
I have used an LLM to suggest a good first issue to start contributing to rust. I also asked some questions on how FileCheck works and had the LLM check my implementation once I was done writing the annotations. The commit message, code added and this PR are by myself.

r? cjgillot

This test checks that unneeded jumps get simplified away. The FileCheck
annotations added establich that the call graph is:

    bar() -> branch on boolean output
        -True -> can jump anywhere, not part of the test
        -False -> jump back to loop with bar() call in it immediately.
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 17, 2026
@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Oct 17, 2026
@rustbot

rustbot commented Oct 17, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the pull request, and welcome! The Rust Project has assigned @jieyouxu (or someone else) to review your changes, you should hear from them (or someone else) within the next two weeks.

Please see the contribution instructions and our LLM policy for more information.

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 77 candidates
  • Random selection from 20 candidates

@rustbot rustbot assigned cjgillot and unassigned jieyouxu Oct 17, 2026
@rlauff

rlauff commented Nov 25, 2026

Copy link
Copy Markdown
Author

r? compiler

original reviewer seems to be inactive atm.

@rustbot rustbot assigned JonathanBrouwer and unassigned cjgillot Nov 25, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member

r? mir-opt

@rustbot rustbot assigned saethlin and unassigned JonathanBrouwer Nov 26, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants