[PATCH] D125858: [LegalizeTypes][VP][NFC] Use an if and two returns instead of ?: operator
WangLian via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 19 00:21:08 PDT 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG993070d11f16: [LegalizeTypes][VP][NFC] Use an if and two returns instead of ?: operator (authored by Jimerlife).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125858/new/
https://reviews.llvm.org/D125858
Files:
llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
Index: llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
===================================================================
--- llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
+++ llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
@@ -5166,10 +5166,10 @@
SDValue InOp1 = GetWidenedVector(N->getOperand(1));
SDValue InOp2 = GetWidenedVector(N->getOperand(2));
assert(InOp1.getValueType() == WidenVT && InOp2.getValueType() == WidenVT);
- return Opcode == ISD::VP_SELECT || Opcode == ISD::VP_MERGE
- ? DAG.getNode(Opcode, SDLoc(N), WidenVT, Cond1, InOp1, InOp2,
- N->getOperand(3))
- : DAG.getNode(Opcode, SDLoc(N), WidenVT, Cond1, InOp1, InOp2);
+ if (Opcode == ISD::VP_SELECT || Opcode == ISD::VP_MERGE)
+ return DAG.getNode(Opcode, SDLoc(N), WidenVT, Cond1, InOp1, InOp2,
+ N->getOperand(3));
+ return DAG.getNode(Opcode, SDLoc(N), WidenVT, Cond1, InOp1, InOp2);
}
SDValue DAGTypeLegalizer::WidenVecRes_SELECT_CC(SDNode *N) {
Index: llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
===================================================================
--- llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
+++ llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
@@ -1112,11 +1112,10 @@
SDValue RHS = GetPromotedInteger(N->getOperand(2));
unsigned Opcode = N->getOpcode();
- return Opcode == ISD::VP_SELECT || Opcode == ISD::VP_MERGE
- ? DAG.getNode(Opcode, SDLoc(N), LHS.getValueType(), Mask, LHS, RHS,
- N->getOperand(3))
- : DAG.getNode(Opcode, SDLoc(N), LHS.getValueType(), Mask, LHS,
- RHS);
+ if (Opcode == ISD::VP_SELECT || Opcode == ISD::VP_MERGE)
+ return DAG.getNode(Opcode, SDLoc(N), LHS.getValueType(), Mask, LHS, RHS,
+ N->getOperand(3));
+ return DAG.getNode(Opcode, SDLoc(N), LHS.getValueType(), Mask, LHS, RHS);
}
SDValue DAGTypeLegalizer::PromoteIntRes_SELECT_CC(SDNode *N) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125858.430592.patch
Type: text/x-patch
Size: 2026 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220519/c0627847/attachment.bin>
More information about the llvm-commits
mailing list