[llvm-bugs] [Bug 45123] New: Instruction for non-existing register is generated when cross-compiling for arm1176jzf-s (raspberry pi zero)

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Mar 5 08:11:49 PST 2020


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

            Bug ID: 45123
           Summary: Instruction for non-existing register is generated
                    when cross-compiling for arm1176jzf-s (raspberry pi
                    zero)
           Product: clang
           Version: 9.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: bojo at jobo.tv
                CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
                    richard-llvm at metafoo.co.uk

Example test can be seen here: https://godbolt.org/z/nrkawW

int main()
{
    long long a = 1234567890;
    auto d = static_cast<double>(a);
    return(d);
}

/*
-target arm-linux-gnueabihf 
-march=armv6 
-mfpu=vfpv2 
-mcpu=arm1176jzf-s
-mtune=arm1176jzf-s
-mfloat-abi=hard
*/

when cross-compiled with clang-9 instruction for non-existing register d16 is
generated:
   ...
   vmov    d16, r0, r1
   vstr    d16, [sp]
   vldr    d16, [sp]
   ...

when cross-compiled with clang-8 or less register d0 (existing is used)
   ...
   vmov    d0, r0, r1
   vstr    d0, [sp]
   vldr    d0, [sp]
   ...

-- 
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/20200305/3018c934/attachment.html>


More information about the llvm-bugs mailing list