[llvm-bugs] [Bug 33547] New: PowerPC - miscompile yields infinite looping when using -code-model=large

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jun 21 09:52:51 PDT 2017


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

            Bug ID: 33547
           Summary: PowerPC - miscompile yields infinite looping when
                    using -code-model=large
           Product: new-bugs
           Version: 4.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: eric.schweitz at pgroup.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 18684
  --> https://bugs.llvm.org/attachment.cgi?id=18684&action=edit
reproducer reduced from larger program

This bug appears in the release_40 branch on PowerPC.

To reproduce:

% opt -O2 bug.bc -o bug.opt.bc
% llc bug.opt.bc -mcpu=native -code-model=large -o bug.s

In the prologue for z0042(), there should be the following sequence

# BB#0:                                 # %L.entry
        addis 3, 2, .LC0 at toc@ha
        bl .L0$pb
.L0$pb:
        ld 4, .LC0 at toc@l(3)
        mflr 3
        lwz 4, 0(4)
        cmpwi    4, 1
        bltlr 0

which is a call from the prologue to the next instruction. This call sends the
program into an infinite loop.

The reproducer has reduced from a much larger code to isolate this specific
code gen pattern.

The SVN commit that results in this failure was 287059. Reverting that
changeset eliminates the infinite loop and corrects the test application.

-- 
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/20170621/d38b85d3/attachment.html>


More information about the llvm-bugs mailing list