-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Closed
Copy link
Description
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
define <8 x i64> @emulate_hi(<8 x i64> %0) #0 {
entry:
%1 = and <8 x i64> %0, splat (i64 1)
%2 = mul <8 x i64> %1, splat (i64 4294967295)
%3 = add <8 x i64> %2, splat (i64 1)
ret <8 x i64> %3
}
attributes #0 = { "target-features"="+avx512vl,+avxifma" }
This IR fails to compile with trunk with this error
LLVM ERROR: Cannot select: t14: v8i64 = X86ISD::VPMADD52L t5, t16, t18
t5: v8i64 = and t2, t18
t2: v8i64,ch = CopyFromReg t0, Register:v8i64 %0
t18: v8i64,ch = X86ISD::VBROADCAST_LOAD<(load (s64) from constant-pool)> t0, t20
t20: i64 = X86ISD::Wrapper TargetConstantPool:i64<i64 1> 0
t16: v8i64,ch = X86ISD::VBROADCAST_LOAD<(load (s64) from constant-pool)> t0, t22
t22: i64 = X86ISD::Wrapper TargetConstantPool:i64<i64 4294967295> 0
t18: v8i64,ch = X86ISD::VBROADCAST_LOAD<(load (s64) from constant-pool)> t0, t20
t20: i64 = X86ISD::Wrapper TargetConstantPool:i64<i64 1> 0
In function: emulate_hi
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace and instructions to reproduce the bug.
Stack dump:
0. Program arguments: /opt/compiler-explorer/clang-assertions-trunk/bin/llc -o /app/output.s -debug <source>
1. Running pass 'Function Pass Manager' on module '<source>'.
2. Running pass 'X86 DAG->DAG Instruction Selection' on function '@emulate_hi'
#0 0x0000000004114118 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x4114118)
#1 0x0000000004110fc4 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
#2 0x00007dc1c1642520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
#3 0x00007dc1c16969fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
#4 0x00007dc1c1642476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
#5 0x00007dc1c16287f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
#6 0x00000000007b7d63 llvm::json::operator==(llvm::json::Value const&, llvm::json::Value const&) (.cold) JSON.cpp:0:0
#7 0x0000000003ea2241 llvm::SelectionDAGISel::CannotYetSelect(llvm::SDNode*) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x3ea2241)
#8 0x0000000003ea6bd9 llvm::SelectionDAGISel::SelectCodeCommon(llvm::SDNode*, unsigned char const*, unsigned int) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x3ea6bd9)
#9 0x0000000002294a77 (anonymous namespace)::X86DAGToDAGISel::Select(llvm::SDNode*) X86ISelDAGToDAG.cpp:0:0
#10 0x0000000003e9e0fb llvm::SelectionDAGISel::DoInstructionSelection() (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x3e9e0fb)
#11 0x0000000003ead4d0 llvm::SelectionDAGISel::CodeGenAndEmitDAG() (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x3ead4d0)
#12 0x0000000003eb0b0d llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x3eb0b0d)
#13 0x0000000003eb20f5 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x3eb20f5)
#14 0x0000000003e9d8ef llvm::SelectionDAGISelLegacy::runOnMachineFunction(llvm::MachineFunction&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x3e9d8ef)
#15 0x00000000030129c9 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (.part.0) MachineFunctionPass.cpp:0:0
#16 0x000000000365b4e8 llvm::FPPassManager::runOnFunction(llvm::Function&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x365b4e8)
#17 0x000000000365b721 llvm::FPPassManager::runOnModule(llvm::Module&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x365b721)
#18 0x000000000365bf8f llvm::legacy::PassManagerImpl::run(llvm::Module&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x365bf8f)
#19 0x00000000008eee3d compileModule(char**, llvm::LLVMContext&) llc.cpp:0:0
#20 0x00000000007bfba6 main (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x7bfba6)
#21 0x00007dc1c1629d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#22 0x00007dc1c1629e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#23 0x00000000008e5295 _start (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x8e5295)
Program terminated with signal: SIGSEGV
Compiler returned: 139
The guilty commit seems to be 212ba92 and this is a regression from 21.1.0
. @Arghnews can you please take a look?