[PATCH] bug fix for PR20020: anti-dependency-breaker causes miscompilation

Sanjay Patel spatel at rotateright.com
Mon Jun 30 15:27:50 PDT 2014


================
Comment at: lib/CodeGen/CriticalAntiDepBreaker.cpp:260
@@ +259,3 @@
+      // FIXME: The tied value should already have been checked in
+      // PrescanInstruction(). Do we need to do this check again?
+
----------------
hfinkel at anl.gov wrote:
> Can you put an assert inside the existing check that the tied registers are in KeepRegs?
Do you mean:
if (MI->isRegTiedToUseOperand(i)) {
 assert(KeepRegs.test(Reg) && "Register is tied but was not added to KeepRegs"));
 continue;
}

But we're checking the KeepRegs value just above this and continuing at that point in the code, so this would only fire if someone inadvertently put code between these two 'if' checks?

http://reviews.llvm.org/D4351






More information about the llvm-commits mailing list