[llvm-bugs] [Bug 32292] New: r29 is used before being saved

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Mar 15 15:22:24 PDT 2017


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

            Bug ID: 32292
           Summary: r29 is used before being saved
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: PowerPC
          Assignee: unassignedbugs at nondot.org
          Reporter: timshen91 at gmail.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 18104
  --> http://bugs.llvm.org/attachment.cgi?id=18104&action=edit
Preprocessed adler32.c from zlib

When compiling adler32 in zlib, in the produced assembly:

~ % ~/sandbox/llvm/bin/clang -O2 -target powerpc64le-linux-gnu -S adler32.pre.c
-o - | grep '\b29\b'
        li 29, 0
        ori 5, 29, 65521
        std 29, -24(1)                  # 8-byte Folded Spill
        sub      29, 6, 0
        rldicl 29, 29, 63, 1
        add 0, 29, 0
        ld 29, -24(1)                   # 8-byte Folded Reload

"li 29, 0" is not dominated by "std 29, -24(1)". r29 is callee-saved, and this
code clobbers r29's original value.

-- 
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/20170315/beaeb098/attachment-0001.html>


More information about the llvm-bugs mailing list