[llvm] [SelectionDAG][X86] Fix the assertion failure in Release build after #91747 (PR #93434)
Shengchen Kan via llvm-commits
llvm-commits at lists.llvm.org
Sun May 26 20:20:53 PDT 2024
================
@@ -49253,8 +49253,10 @@ static SDValue combineX86SubCmpForFlags(SDNode *N, SDValue Flag,
return SDValue();
SDValue X = SetCC.getOperand(1);
- // Replace API is called manually here b/c the number of results may change.
- DAG.ReplaceAllUsesOfValueWith(Flag, X);
+ // sub has two results while X only have one. DAG combine assumes the value
+ // type matches.
+ if (N->getNumValues() > 1)
----------------
KanRobert wrote:
Good suggestion, done
https://github.com/llvm/llvm-project/pull/93434
More information about the llvm-commits
mailing list