[PATCH] D46404: [DAG] Avoid using deleted node in rebuildSetCC

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 8 14:10:19 PDT 2018


efriedma added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:11511
+        N = Tmp;
+    }
 
----------------
This needs a much better comment explaining what we're doing, and why; normally the DAGCombine visitors are not supposed to call each other (because it causes weird issues like this).

----

And actually, I'm not sure why we're calling visitXOR here in the first place; if we're missing some important optimization on xors, we should probably fix the setcc optimizations to do the same thing rather than try to delay the xor->setcc transform.  But I won't ask you to change that here; I don't want to delay the bugfix.


Repository:
  rL LLVM

https://reviews.llvm.org/D46404





More information about the llvm-commits mailing list