Possible regression for ui/match/issue-114691.rs #141340
Labels
A-LLVM
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.
C-bug
Category: This is a bug.
E-needs-bisection
Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc
I-prioritize
Issue: Indicates that prioritization has been requested for this issue.
regression-untriaged
Untriaged performance or correctness regression.
S-needs-repro
Status: This issue has no reproduction and needs a reproduction to make progress.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Copied code for the test in question here:
This test is regressing for us with a custom target, because the problematic transformation
foldBoolSelectToLogic
still runs on the IR forfn test
. This is after updating to LLVM 19.To me, it's clear to see why the transformation is invalid, but for seemingly different reasons than the above fix addresses. The IR is:
Which represents a logical, short-circuiting
or
operation on%mode.0.val
and%mode.1.val
. And since%mode.1.val
is not marked asnoundef
, it shouldn't be valid to transform that operation into a bitwiseor
, since%mode.1.val
being undefined now has an effect on the result regardless of whether%mode.0.val
is true or not.Does anyone have a theory as to why this fix used to work, but seems to no longer work? Frustratingly, the testcase still passes for x86_64, but that doesn't mean anything about this fix because they have switched to using GlobalISel.
Relates to issue #114691
The text was updated successfully, but these errors were encountered: