[llvm] [DAG] visitFREEZE - remove unused HadMaybePoisonOperands check. NFC. (PR #149517)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 18 07:10:52 PDT 2025


https://github.com/RKSimon created https://github.com/llvm/llvm-project/pull/149517

Redundant since #145939

>From 9e66944aae9072ff6e434b1012d26467aa4c5a1a Mon Sep 17 00:00:00 2001
From: Simon Pilgrim <llvm-dev at redking.me.uk>
Date: Fri, 18 Jul 2025 15:09:39 +0100
Subject: [PATCH] [DAG] visitFREEZE - remove unused HadMaybePoisonOperands
 check. NFC.

Redundant since #145939
---
 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 40464e91f9efc..867c7934a8a71 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -16772,12 +16772,8 @@ SDValue DAGCombiner::visitFREEZE(SDNode *N) {
     if (DAG.isGuaranteedNotToBeUndefOrPoison(Op, /*PoisonOnly*/ false,
                                              /*Depth*/ 1))
       continue;
-    bool HadMaybePoisonOperands = !MaybePoisonOperands.empty();
-    bool IsNewMaybePoisonOperand = MaybePoisonOperands.insert(Op).second;
-    if (IsNewMaybePoisonOperand)
+    if (MaybePoisonOperands.insert(Op).second)
       MaybePoisonOperandNumbers.push_back(OpNo);
-    if (!HadMaybePoisonOperands)
-      continue;
   }
   // NOTE: the whole op may be not guaranteed to not be undef or poison because
   // it could create undef or poison due to it's poison-generating flags.



More information about the llvm-commits mailing list