[PATCH] D141256: [DAGCombine]Don't check for Undef/Poison if the node is deleted
    Roman Lebedev via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Jan  9 14:28:16 PST 2023
    
    
  
lebedev.ri added a comment.
Or better yet,
  diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  index 78cbfe1356f7..82fdbf1cc790 100644
  --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  @@ -14341,6 +14341,9 @@ SDValue DAGCombiner::visitFREEZE(SDNode *N) {
                                MaybePoisonOperand);
       }
     }
  +  // The whole node may have been updated, so the value we were holding
  +  // may no longer be valid. Re-fetch the operand we're `freeze`ing.
  +  N0 = N->getOperand(0);
   
     // Finally, recreate the node, it's operands were updated to use
     // frozen operands, so we just need to use it's "original" operands.
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141256/new/
https://reviews.llvm.org/D141256
    
    
More information about the llvm-commits
mailing list