[llvm-bugs] [Bug 27068] New: ARM backend uses different ABI functions based on optimization level

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Mar 25 08:22:41 PDT 2016


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

            Bug ID: 27068
           Summary: ARM backend uses different ABI functions based on
                    optimization level
           Product: new-bugs
           Version: 3.8
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: hidde at vectorfabrics.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

I'm using a build found here: http://llvm.org/apt/
$ clang-3.8 --version
Ubuntu clang version 3.8.0-svn257311-1~exp1 (trunk) (based on LLVM 3.8.0)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

The example program:
$ cat int.c
int f(int a, int b)
{
  return a % b;
}

-O0 uses __modsi3 (GNU style (?), not ARM EABI compliant)
$ clang-3.8 int.c -S -O0 -target arm-linux-androideabi -march=armv7-a -o - |
grep mod | grep bl
    bl    __modsi3

-O1 uses __aeabi_idivmod (ARM EABI compliant)
$ clang-3.8 int.c -S -O1 -target arm-linux-androideabi -march=armv7-a -o - |
grep mod | grep bl
    bl    __aeabi_idivmod(PLT)

I expect ARM EABI compliant code to be generated. On top of that, I expect the
ABI not to vary based on optimization level.

-- 
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/20160325/5607f44b/attachment.html>


More information about the llvm-bugs mailing list