[llvm] [DAG] Remove Depth=1 hack from isGuaranteedNotToBeUndefOrPoison checks (PR #152127)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 5 04:45:54 PDT 2025


================
@@ -16813,8 +16813,7 @@ SDValue DAGCombiner::visitFREEZE(SDNode *N) {
   SmallSet<SDValue, 8> MaybePoisonOperands;
   SmallVector<unsigned, 8> MaybePoisonOperandNumbers;
   for (auto [OpNo, Op] : enumerate(N0->ops())) {
-    if (DAG.isGuaranteedNotToBeUndefOrPoison(Op, /*PoisonOnly*/ false,
-                                             /*Depth*/ 1))
+    if (DAG.isGuaranteedNotToBeUndefOrPoison(Op, /*PoisonOnly*/ false))
----------------
arsenm wrote:

```suggestion
    if (DAG.isGuaranteedNotToBeUndefOrPoison(Op, /*PoisonOnly=*/ false))
```

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


More information about the llvm-commits mailing list