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

Björn Pettersson via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 12 07:37:27 PDT 2024


================
@@ -5073,6 +5073,16 @@ bool SelectionDAG::canCreateUndefOrPoison(SDValue Op, const APInt &DemandedElts,
   case ISD::FREEZE:
   case ISD::CONCAT_VECTORS:
   case ISD::INSERT_SUBVECTOR:
+  case ISD::SADDSAT:
+  case ISD::UADDSAT:
+  case ISD::SSUBSAT:
+  case ISD::USUBSAT:
+  case ISD::MULHU:
+  case ISD::MULHS:
+  case ISD::SMIN:
+  case ISD::SMAX:
+  case ISD::UMIN:
+  case ISD::UMAX:
----------------
bjope wrote:

I haven't really investigated coverage for any of these. I detected that the analysis stopped on these downstream in a few cases, and thought that they were "safe to add". But maybe we want to have some sort of test coverage (although I'm not sure what kind of test that is preferred).
OTOH, I doubt that we have test coverage for all operations that currently just return true by default either ;-)

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


More information about the llvm-commits mailing list