[LLVMbugs] [Bug 16216] New: llc code generation error

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Jun 3 17:00:59 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=16216

            Bug ID: 16216
           Summary: llc code generation error
           Product: tools
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: llc
          Assignee: unassignedbugs at nondot.org
          Reporter: keid.llvm at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 10627
  --> http://llvm.org/bugs/attachment.cgi?id=10627&action=edit
annotated LLVM .ll file

This is an llc code generation error.  It appears with the attached .ll file
with trunk (as of last and this week), but not 3.1 or 3.2 which produce
identical code that is quite different than what what trunk produces.

This bug appears when using llc -O0 on the attached .ll file.  Examining the
x86 assembly llc produces, it is clear that a x86 register values gets stomped
on before use, specifically the dividend in EAX before the division operation. 
This error can be made to disappear by reducing register
pressure/spills-reloads by making changes as described below.

lli produces correct results.  Higher levels of llc optimization produce
correct results.

The attached code has the relevant chunk of code marked with

;; aaa[indvar] = aa[indvar] / a[indvar]

Running the code with llc -O0 will produce incorrect output.  Making either of
the changes in the following ;; comments in the code will make the error
disappear (EAX doesn't get stepped on before use).

-- 
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/20130604/303d94bf/attachment.html>


More information about the llvm-bugs mailing list