Skip to content

Commit 44c7a95

Browse files
committed
DAG: Fix losing flags on select when expanding select_cc
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.
1 parent aef0bdd commit 44c7a95

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4159,7 +4159,8 @@ bool SelectionDAGLegalize::ExpandNode(SDNode *Node) {
41594159
"expanded.");
41604160
EVT CCVT = getSetCCResultType(CmpVT);
41614161
SDValue Cond = DAG.getNode(ISD::SETCC, dl, CCVT, Tmp1, Tmp2, CC, Node->getFlags());
4162-
Results.push_back(DAG.getSelect(dl, VT, Cond, Tmp3, Tmp4));
4162+
Results.push_back(
4163+
DAG.getSelect(dl, VT, Cond, Tmp3, Tmp4, Node->getFlags()));
41634164
break;
41644165
}
41654166

0 commit comments

Comments
 (0)