[llvm] DAG: Fix losing flags on select when expanding select_cc (PR #93662)
via llvm-commits
llvm-commits at lists.llvm.org
Wed May 29 03:33:11 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-selectiondag
Author: Matt Arsenault (arsenm)
<details>
<summary>Changes</summary>
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.
---
Full diff: https://github.com/llvm/llvm-project/pull/93662.diff
1 Files Affected:
- (modified) llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (+2-1)
``````````diff
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;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/93662
More information about the llvm-commits
mailing list