[LLVMbugs] [Bug 23640] Fast isel causes: Assertion `MRI->getVRegDef(reg) && "Register use before def!"

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat May 23 05:19:08 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=23640

Hal Finkel <hfinkel at anl.gov> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Hal Finkel <hfinkel at anl.gov> ---
(In reply to comment #1)
> So I took a look at this in a testcase I had and basically the compare is
> actually in a different basic block from the branch that it's dependent upon
> and not getting put into the value map so we can't look up the actual
> compare result we wanted to use.
> A hammer of "CI->getParent() != BI->getParent()" in selectBranch does
> "solve" the problem as would constructing selectCompare.

Ah, indeed. That's the case here too. Also, there is this large FIXME in the
current code:

  // FIXME: ARM looks for a case where the block containing the compare
  // has been split from the block containing the branch.  If this happens,
  // there is a vreg available containing the result of the compare.  I'm
  // not sure we can do much, as we've lost the predicate information with
  // the compare instruction -- we have a 4-bit CR but don't know which bit
  // to test here.
  return false;

and we should be ending up here (unfortunately). We did not have the right
check, however. Should be fixed by r238097.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150523/81277000/attachment.html>


More information about the llvm-bugs mailing list