[llvm] 121689a - [SelectionDAG][NFC] Simplify integer promotion in setcc/vp.setcc
Ben Shi via llvm-commits
llvm-commits at lists.llvm.org
Thu May 26 22:50:37 PDT 2022
Author: Ping Deng
Date: 2022-05-27T05:50:19Z
New Revision: 121689a62e5b86cce0c5474f902cb24ff6dd57c5
URL: https://github.com/llvm/llvm-project/commit/121689a62e5b86cce0c5474f902cb24ff6dd57c5
DIFF: https://github.com/llvm/llvm-project/commit/121689a62e5b86cce0c5474f902cb24ff6dd57c5.diff
LOG: [SelectionDAG][NFC] Simplify integer promotion in setcc/vp.setcc
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D126516
Added:
Modified:
llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
index 8a04b7f61e58a..686de3933c5f9 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
@@ -1949,10 +1949,9 @@ SDValue DAGTypeLegalizer::PromoteIntOp_SETCC(SDNode *N, unsigned OpNo) {
PromoteSetCCOperands(LHS, RHS, cast<CondCodeSDNode>(N->getOperand(2))->get());
// The CC (#2) is always legal.
- if (N->getNumOperands() == 3)
+ if (N->getOpcode() == ISD::SETCC)
return SDValue(DAG.UpdateNodeOperands(N, LHS, RHS, N->getOperand(2)), 0);
- assert(N->getNumOperands() == 5 && "Unexpected number of operands!");
assert(N->getOpcode() == ISD::VP_SETCC && "Expected VP_SETCC opcode");
return SDValue(DAG.UpdateNodeOperands(N, LHS, RHS, N->getOperand(2),
More information about the llvm-commits
mailing list