[llvm-bugs] [Bug 51672] New: x32 Cannot emit physreg copy instruction

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Aug 30 04:36:12 PDT 2021


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

            Bug ID: 51672
           Summary: x32 Cannot emit physreg copy instruction
           Product: libraries
           Version: 12.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: uko.koknevics at zimperium.com
                CC: craig.topper at gmail.com, llvm-bugs at lists.llvm.org,
                    llvm-dev at redking.me.uk, pengfei.wang at intel.com,
                    spatel+llvm at rotateright.com

Created attachment 25199
  --> https://bugs.llvm.org/attachment.cgi?id=25199&action=edit
minified .bc file

`llc --mtriple=x86_64-linux-gnux32 bugpoint-reduced-simplified.bc` fails. 

Compiling for `x86_64-linux-gnu`, `i386-linux-gnu`, `aarch64-linux-gnu` works
fine, didn't test on any other targets.

Failed with Debian bullseye's llvm 11.0.1 (1:11.0-51+nmu5), custom-built
versions from 11.0.0 to 12.0.1.  (Stack trace is from Debian's llvm as the
custom-built ones aren't built with all the symbols.)

The `.bc` file was generated by `clang++ -O2 -mx32 -c main.cpp -emit-llvm` and
then minified with `bugpoint` as per instructions.  `g++ -O2 -mx32` (Debian
bullseye 4:10.2.1-1) compiles the same `main.cpp` file with no issues.

Stack dump:
0.      Program arguments: llc --mtriple=x86_64-linux-gnux32
bugpoint-reduced-simplified.bc
1.      Running pass 'Function Pass Manager' on module
'bugpoint-reduced-simplified.bc'.
2.      Running pass 'Post-RA pseudo instruction expansion pass' on function
'@_Z1bv'
 #0 0x00007f9c75dfaf8f llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/usr/lib/x86_64-linux-gnu/libLLVM-11.so.1+0xbd0f8f)
 #1 0x00007f9c75df92f0 llvm::sys::RunSignalHandlers()
(/usr/lib/x86_64-linux-gnu/libLLVM-11.so.1+0xbcf2f0)
 #2 0x00007f9c75dfb465 (/usr/lib/x86_64-linux-gnu/libLLVM-11.so.1+0xbd1465)
 #3 0x00007f9c7521c140 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x14140)
 #4 0x00007f9c74d53ce1 raise ./signal/../sysdeps/unix/sysv/linux/raise.c:51:1
 #5 0x00007f9c74d3d537 abort ./stdlib/abort.c:81:7
 #6 0x00007f9c75d4ad68 (/usr/lib/x86_64-linux-gnu/libLLVM-11.so.1+0xb20d68)
 #7 0x00007f9c75d4ab88 (/usr/lib/x86_64-linux-gnu/libLLVM-11.so.1+0xb20b88)
 #8 0x00007f9c77f38bad (/usr/lib/x86_64-linux-gnu/libLLVM-11.so.1+0x2d0ebad)
 #9 0x00007f9c75ff73bf (/usr/lib/x86_64-linux-gnu/libLLVM-11.so.1+0xdcd3bf)
#10 0x00007f9c760ce1ae
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
(/usr/lib/x86_64-linux-gnu/libLLVM-11.so.1+0xea41ae)
#11 0x00007f9c75f0a059 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/usr/lib/x86_64-linux-gnu/libLLVM-11.so.1+0xce0059)
#12 0x00007f9c75f0f603 llvm::FPPassManager::runOnModule(llvm::Module&)
(/usr/lib/x86_64-linux-gnu/libLLVM-11.so.1+0xce5603)
#13 0x00007f9c75f0a670 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/usr/lib/x86_64-linux-gnu/libLLVM-11.so.1+0xce0670)
#14 0x000000000040e0df main (/usr/lib/llvm-11/bin/llc+0x40e0df)
#15 0x00007f9c74d3ed0a __libc_start_main ./csu/../csu/libc-start.c:308:16
#16 0x000000000040ba2a _start (/usr/lib/llvm-11/bin/llc+0x40ba2a)
Aborted

-- 
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/20210830/8e761dab/attachment.html>


More information about the llvm-bugs mailing list