[llvm] [SelectionDAG] Add ISD::VSELECT to SelectionDAG::canCreateUndefOrPoison. (PR #143760)
Björn Pettersson via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 12 14:33:13 PDT 2025
================
@@ -5553,6 +5553,7 @@ bool SelectionDAG::canCreateUndefOrPoison(SDValue Op, const APInt &DemandedElts,
case ISD::BUILD_VECTOR:
case ISD::BUILD_PAIR:
case ISD::SPLAT_VECTOR:
+ case ISD::VSELECT:
----------------
bjope wrote:
Is it safe to also add normal SELECT as well then? Or are we afraid of possible fast-math-flags?
Maybe the early out above related to ConsiderFlags should be seen as taking care of any poison generating flags?
(I think ISDOpcodes.h is still lacking documentation about SELECT having flags, and possibly undefined results. And to be honest, I don't know myself if VSELECT can have fast-math flags as well. Not sure how developers are supposed to know such things if we do not document it in ISDOpcodes.h?)
Or are we perhaps afraid of performance penalties if making helpers like this more "complete" to cover all ISD nodes?
https://github.com/llvm/llvm-project/pull/143760
More information about the llvm-commits
mailing list