Skip to content

Conversation

@AndrewTKent
Copy link
Contributor

@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
rust-bors bot pushed a commit that referenced this pull request Jan 28, 2026
Rollup of 9 pull requests

Successful merges:

 - #151239 (Support trait objects in type info reflection)
 - #150893 (offload: move (un)register lib into global_ctors)
 - #151013 (Add some clarifications and fixes for fmt syntax)
 - #151666 (compiler: Rename several types/traits for per-query vtables)
 - #151738 (Add `extern crate core` to diagnostic tests)
 - #151747 (Update `askama` version to `0.15.2`)
 - #151759 (Update `browser-ui-test` version to `0.23.3`)
 - #151763 (Add FileCheck annotations to simplify_match.rs)
 - #151766 (Fix `x fix`, again)
@rust-bors rust-bors bot merged commit c6ea8ab into rust-lang:main Jan 28, 2026
11 checks passed
@rustbot rustbot added this to the 1.95.0 milestone Jan 28, 2026
rust-timer added a commit that referenced this pull request Jan 28, 2026
Rollup merge of #151763 - AndrewTKent:add-filecheck-simplify-match, r=dianqk

Add FileCheck annotations to simplify_match.rs

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
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