[llvm-commits] [llvm] r144568 - /llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp

Evan Cheng evan.cheng at apple.com
Mon Nov 14 13:02:09 PST 2011


Author: evancheng
Date: Mon Nov 14 15:02:09 2011
New Revision: 144568

URL: http://llvm.org/viewvc/llvm-project?rev=144568&view=rev
Log:
At -O0, multiple uses of a virtual registers in the same BB are being marked
"kill". This looks like a bug upstream. Since that's going to take some time
to understand, loosen the assertion and disable the optimization when
multiple kills are seen.

Modified:
    llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp

Modified: llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp?rev=144568&r1=144567&r2=144568&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp (original)
+++ llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp Mon Nov 14 15:02:09 2011
@@ -502,7 +502,8 @@
       continue;
     if (!UI.getOperand().isKill())
       return 0;
-    assert(!KillMI && "More than one local kills?");
+    if (KillMI)
+      return 0;  // -O0 kill markers cannot be trusted?
     KillMI = UseMI;
   }
 





More information about the llvm-commits mailing list