[llvm] f68fdb8 - DAG: Fix losing flags on select when expanding select_cc (#93662)
via llvm-commits
llvm-commits at lists.llvm.org
Wed May 29 13:02:30 PDT 2024
Author: Matt Arsenault
Date: 2024-05-29T22:02:27+02:00
New Revision: f68fdb84e1809caf42dd22b94145f06974429091
URL: https://github.com/llvm/llvm-project/commit/f68fdb84e1809caf42dd22b94145f06974429091
DIFF: https://github.com/llvm/llvm-project/commit/f68fdb84e1809caf42dd22b94145f06974429091.diff
LOG: DAG: Fix losing flags on select when expanding select_cc (#93662)
This was only preserving the flags on the setcc, not the new select.
This was missing presumably due to getSelect not having a flags argument
until recently. Avoids regressions in a future commit.
Added:
Modified:
llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index bfc2273c9425c..51f2cf9017f85 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -4159,7 +4159,8 @@ bool SelectionDAGLegalize::ExpandNode(SDNode *Node) {
"expanded.");
EVT CCVT = getSetCCResultType(CmpVT);
SDValue Cond = DAG.getNode(ISD::SETCC, dl, CCVT, Tmp1, Tmp2, CC, Node->getFlags());
- Results.push_back(DAG.getSelect(dl, VT, Cond, Tmp3, Tmp4));
+ Results.push_back(
+ DAG.getSelect(dl, VT, Cond, Tmp3, Tmp4, Node->getFlags()));
break;
}
More information about the llvm-commits
mailing list