[llvm-bugs] [Bug 51829] New: ICE on ridiculous int

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Sep 12 12:01:40 PDT 2021


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

            Bug ID: 51829
           Summary: ICE on ridiculous int
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Common Code Generator Code
          Assignee: unassignedbugs at nondot.org
          Reporter: llvm at rifkin.dev
                CC: llvm-bugs at lists.llvm.org

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 <source>
1.      Running pass 'Function Pass Manager' on module '<source>'.
2.      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.

-- 
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/20210912/ce0c9bd1/attachment.html>


More information about the llvm-bugs mailing list