[llvm] [SelectionDAG] Handle more opcodes in canCreateUndefOrPoison (PR #84921)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 12 07:24:38 PDT 2024
================
@@ -5091,8 +5101,18 @@ bool SelectionDAG::canCreateUndefOrPoison(SDValue Op, const APInt &DemandedElts,
case ISD::BITCAST:
case ISD::BUILD_VECTOR:
case ISD::BUILD_PAIR:
+ case ISD::SELECT:
return false;
+ case ISD::SELECT_CC: {
+ // Integer select_cc cannot create undef or poison.
+ if (Op.getOperand(0).getValueType().isInteger())
+ return false;
+
+ // FIXME: Handle FP compares.
----------------
nikic wrote:
Can this be combined with the following SETCC case, which has FP handling?
https://github.com/llvm/llvm-project/pull/84921
More information about the llvm-commits
mailing list