[llvm] [SelectionDAG] Handle more opcodes in canCreateUndefOrPoison (PR #84921)

Björn Pettersson via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 12 14:18:10 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:
----------------
bjope wrote:

Not sure if I dare to assert that there are no flags here. I suspect that we can end up having flags like nnan being set on operations like AND, FREEZE and BITCAST. Although that is probably a bug?
And I found some case when pushing freeze through a FP SELECT looked a bit suspicious (regression). So I think I'll just skip dealing with SELECT in this patch and leave that for the future.

https://github.com/llvm/llvm-project/pull/84921


More information about the llvm-commits mailing list