[PATCH] D45673: [x86] Fix PR37100 by teaching the EFLAGS copy lowering to rewrite uses across basic blocks in the limited cases where it is very straight forward to do so.

Michael Zolotukhin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 18 23:13:11 PDT 2018


mzolotukhin added inline comments.


================
Comment at: llvm/trunk/lib/Target/X86/X86FlagsCopyLowering.cpp:445-457
+      if (&TestMBB != &UseMBB && !MDT->dominates(&TestMBB, &UseMBB)) {
+        DEBUG({
+          dbgs() << "ERROR: Encountered use that is not dominated by our test "
+                    "basic block! Rewriting this would require inserting PHI "
+                    "nodes to track the flag state across the CFG.\n\nTest "
+                    "block:\n";
+          TestMBB.dump();
----------------
Could all of this be under `DEBUG`? The fatal error we're reporting here looks like an internal compiler assert anyway.
If we put in entirely under `DEBUG`, we can avoid building dominators in Release compilers.


Repository:
  rL LLVM

https://reviews.llvm.org/D45673





More information about the llvm-commits mailing list