[llvm-bugs] [Bug 36011] New: Incorrect codegen for x32 ?

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Jan 18 23:13:51 PST 2018


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

            Bug ID: 36011
           Summary: Incorrect codegen for x32 ?
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: cs12b1010 at iith.ac.in
                CC: llvm-bugs at lists.llvm.org

Created attachment 19708
  --> https://bugs.llvm.org/attachment.cgi?id=19708&action=edit
test case

Even though RBX is a callee-save register, it is not being saved before use in
the "base()" function in the attached test case. I have checked with LLVM 3.8
too and the same behavior exists even then. It is reproducible on trunk Jan
18/2018.

Steps to reproduce bug:
llc -mtriple=x86_64-pc-linux-gnux32 -stackrealign -stack-alignment=32 final.ll
clang final.s
./a.out
echo $?

Expected return value: 30
Actual return value: garbage.

The test case is an extended version of x86-64-baseptr.ll

-- 
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/20180119/031cce9a/attachment.html>


More information about the llvm-bugs mailing list