Issue |
64323
|
Summary |
[x86_64] Passing v1i1 as function argument crashes on icelake-server
|
Labels |
new issue
|
Assignees |
|
Reporter |
oakrc
|
[Demo on Compiler Explorer](https://godbolt.org/z/vrrMx6Pzq)
- If the fcmp is replaced with a `load <1 x i1>, ptr @G`, the crash error changes to "Cannot emit physreg copy instruction"
- The crash disappears when `-mcpu=icelake-server` is removed.
Code:
```llvm
@G = global <1 x i1> <i1 true>
define <1 x i1> @f(<1 x float> %0) {
%A = fcmp oeq <1 x float> %0, <float 0x36A0000000000000>
%B = call <1 x i1> @g(<1 x i1> %A)
ret <1 x i1> %B
}
declare <1 x i1> @g(<1 x i1> %0)
```
Crash backtrace:
```
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: /opt/compiler-explorer/clang-trunk/bin/llc -o /app/output.s -x86-asm-syntax=intel -mtriple=x86_64 -mcpu=icelake-server <source>
1. Running pass 'Function Pass Manager' on module '<source>'.
2. Running pass 'X86 Domain Reassignment Pass' on function '@f'
#0 0x000000000305a128 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-trunk/bin/llc+0x305a128)
#1 0x0000000003057cec SignalHandler(int) Signals.cpp:0:0
#2 0x00007fe6bc5b8420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
#3 0x00000000018d3b4d (anonymous namespace)::X86DomainReassignment::visitRegister((anonymous namespace)::Closure&, llvm::Register, (anonymous namespace)::RegDomain&, llvm::SmallVectorImpl<unsigned int>&) (.isra.0) X86DomainReassignment.cpp:0:0
#4 0x00000000018d51a9 (anonymous namespace)::X86DomainReassignment::runOnMachineFunction(llvm::MachineFunction&) (.part.0) X86DomainReassignment.cpp:0:0
#5 0x0000000002439700 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (.part.0) MachineFunctionPass.cpp:0:0
#6 0x000000000291aeb2 llvm::FPPassManager::runOnFunction(llvm::Function&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x291aeb2)
#7 0x000000000291b031 llvm::FPPassManager::runOnModule(llvm::Module&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x291b031)
#8 0x000000000291cba0 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x291cba0)
#9 0x00000000007673f0 compileModule(char**, llvm::LLVMContext&) llc.cpp:0:0
#10 0x00000000006a8b82 main (/opt/compiler-explorer/clang-trunk/bin/llc+0x6a8b82)
#11 0x00007fe6bc05c083 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24083)
#12 0x000000000075f33e _start (/opt/compiler-explorer/clang-trunk/bin/llc+0x75f33e)
Program terminated with signal: SIGSEGV
Compiler returned: 139
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs