Skip to content

Conversation

@AndrewTKent
Copy link

@AndrewTKent AndrewTKent commented Jan 27, 2026

Remove skip-filecheck and add FileCheck directives to verify that GVN propagates the constant false and eliminates the match entirely.

The test now verifies:

  • The debug info shows x as const false (constant propagation)
  • No switchInt remains (match elimination)
  • The function body is just return (dead code elimination)

Part of #116971.

r? cjgillot

@rustbot rustbot added 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. labels Jan 27, 2026
@rustbot

This comment has been minimized.

Remove `skip-filecheck` and add FileCheck directives to verify that GVN
propagates the constant `false` and eliminates the match entirely.

The test now verifies:
- The debug info shows `x` as `const false` (constant propagation)
- No `switchInt` remains (match elimination)
- The function body is just `return` (dead code elimination)
@AndrewTKent AndrewTKent force-pushed the add-filecheck-simplify-match branch from 723e39c to 31d011a Compare January 27, 2026 21:37
@dianqk
Copy link
Member

dianqk commented Jan 28, 2026

r? dianqk

@rustbot rustbot assigned dianqk and unassigned cjgillot Jan 28, 2026
@dianqk
Copy link
Member

dianqk commented Jan 28, 2026

@bors r+ rollup

@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 28, 2026

📌 Commit 31d011a has been approved by dianqk

It is now in the queue for this repository.

@rust-bors rust-bors bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

4 participants