[llvm] [X86] Fix commuteSelect miscompile with double-used condition value (PR #219436)
Phoebe Wang via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 28 07:52:28 PDT 2026
================
@@ -48701,8 +48701,7 @@ static SDValue commuteSelect(SDNode *N, SelectionDAG &DAG, const SDLoc &DL,
return SDValue();
// For multi-use setcc, check that all users are vselects that benefit.
- bool CondHasOneUse = Cond.hasOneUse();
- if (!CondHasOneUse) {
+ if (!Cond.hasOneUse()) {
if (!llvm::all_of(Cond->users(), [&](SDNode *User) {
----------------
phoebewang wrote:
Seems less efficient to run this for each of the select nodes, but I don't have a good solution.
https://github.com/llvm/llvm-project/pull/219436
More information about the llvm-commits
mailing list