Closed
Description
Bugzilla Link | 51829 |
Resolution | FIXED |
Resolved on | Sep 14, 2021 08:12 |
Version | trunk |
OS | Windows NT |
CC | @topperc,@erichkeane,@RKSimon |
Fixed by commit(s) | 2fd180b |
Extended Description
The following code causes an ICE:
define void @foo(i16777215* %0, i16777215* %1, i16777215* %2) {
%4 = load i16777215, i16777215* %1
%5 = load i16777215, i16777215* %2
%6 = add nsw i16777215 %5, %4
store i16777215 %6, i16777215* %0
ret void
}
or C++:
typedef _ExtInt(16777215) i;
i foo(i a, i b) {
return a + b;
}
PLEASE submit a bug report to https://bugs.llvm.org/ 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
- Running pass 'Function Pass Manager' on module '
'. - Running pass 'X86 DAG->DAG Instruction Selection' on function '@foo'
#0 0x000055ade6ed25bf PrintStackTraceSignalHandler(void*) Signals.cpp:0:0
#1 0x000055ade6ecfe6d SignalHandler(int) Signals.cpp:0:0
#2 0x00007f915f8a43c0 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x153c0)
#3 0x000055ade6e0493a llvm::APInt::setBitsSlowCase(unsigned int, unsigned int) (/opt/compiler-explorer/clang-trunk/bin/llc+0x2a0493a)
#4 0x000055ade5385aac llvm::APInt::getLowBitsSet(unsigned int, unsigned int) (/opt/compiler-explorer/clang-trunk/bin/llc+0xf85aac)
#5 0x000055ade6bffea6 (anonymous namespace)::DAGCombiner::visitSTORE(llvm::SDNode*) DAGCombiner.cpp:0:0
#6 0x000055ade6c09269 (anonymous namespace)::DAGCombiner::visit(llvm::SDNode*) DAGCombiner.cpp:0:0
#7 0x000055ade6c0bccd (anonymous namespace)::DAGCombiner::combine(llvm::SDNode*) DAGCombiner.cpp:0:0
#8 0x000055ade6c0d5ac llvm::SelectionDAG::Combine(llvm::CombineLevel, llvm::AAResults*, llvm::CodeGenOpt::Level) (/opt/compiler-explorer/clang-trunk/bin/llc+0x280d5ac)
#9 0x000055ade6d06db7 llvm::SelectionDAGISel::CodeGenAndEmitDAG() (/opt/compiler-explorer/clang-trunk/bin/llc+0x2906db7)
#10 0x000055ade6d0a104 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x290a104)
#11 0x000055ade6d0c392 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (.part.887) SelectionDAGISel.cpp:0:0
#12 0x000055ade5ab8fd0 (anonymous namespace)::X86DAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&) X86ISelDAGToDAG.cpp:0:0
#13 0x000055ade6332458 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x1f32458)
#14 0x000055ade6758fb9 llvm::FPPassManager::runOnFunction(llvm::Function&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x2358fb9)
#15 0x000055ade6759251 llvm::FPPassManager::runOnModule(llvm::Module&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x2359251)
#16 0x000055ade675a4c7 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x235a4c7)
#17 0x000055ade4cd6da1 compileModule(char**, llvm::LLVMContext&) llc.cpp:0:0
#18 0x000055ade4c02c56 main (/opt/compiler-explorer/clang-trunk/bin/llc+0x802c56)
#19 0x00007f915f3540b3 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b3)
#20 0x000055ade4cceb1a _start (/opt/compiler-explorer/clang-trunk/bin/llc+0x8ceb1a)
Compiler returned: 139
Needless to say, ICE on this core feature is breaking many codebases and should have top priority :)
Bug goes at least back to 10.0.0.