[llvm] Make RAUW skip instances where operand is the replacement node (PR #212724)

Soham Karandikar via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 3 08:51:01 PDT 2026


================
@@ -13307,6 +13301,18 @@ void SelectionDAG::ReplaceAllUsesOfValueWith(SDValue From, SDValue To){
   RAUWUpdateListener Listener(*this, UI, UE);
   while (UI != UE) {
     SDNode *User = UI->getUser();
+    
+    // Don't replace uses of the To node if is is self-referential.
----------------
skadewdl3 wrote:

I'll give it a shot!

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


More information about the llvm-commits mailing list