[LLVMbugs] [Bug 5421] New: llc crash on i128 switch

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Fri Nov 6 19:28:08 PST 2009


http://llvm.org/bugs/show_bug.cgi?id=5421

           Summary: llc crash on i128 switch
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Backend: X86
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: daniel at zuster.org
                CC: llvmbugs at cs.uiuc.edu


--
ddunbar at giles:tmp$ cat x.ll
; ModuleID = '<stdin>'
target datalayout =
"e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
target triple = "x86_64-apple-darwin10.0"

define void @f0() {
entry:
  switch i128 undef, label %exit [
    i128 55340232221128654848, label %exit
    i128 92233720368547758080, label %exit
    i128 73786976294838206464, label %exit
    i128 147573952589676412928, label %exit
  ]
exit:
  unreachable
}
ddunbar at giles:tmp$ llc < x.ll
Assertion failed: (getMinSignedBits() <= 64 && "Too many bits for int64_t"),
function getSExtValue, file
/Volumes/Data/Users/ddunbar/llvm/include/llvm/ADT/APInt.h, line 1060.
0  llc               0x0000000100bb7acb PrintStackTrace(void*) + 38
1  llc               0x0000000100bb8059 SignalHandler(int) + 336
2  libSystem.B.dylib 0x00007fff80ab00aa _sigtramp + 26
3  libSystem.B.dylib 0x00007fff5fbfe1b0 _sigtramp + 3742687520
4  libSystem.B.dylib 0x00007fff80b2c0b4 __pthread_markcancel + 0
5  llc               0x0000000100266280 llvm::APInt::getSExtValue() const + 148
6  llc               0x00000001008049c9 llvm::ConstantInt::getSExtValue() const
+ 25
7  llc               0x00000001008049ed
llvm::SelectionDAGLowering::Case::size() const + 33
8  llc               0x00000001007ecc74
llvm::SelectionDAGLowering::handleJTSwitchCase(llvm::SelectionDAGLowering::CaseRec&,
std::vector<llvm::SelectionDAGLowering::CaseRec,
std::allocator<llvm::SelectionDAGLowering::CaseRec> >&, llvm::Value*,
llvm::MachineBasicBlock*) + 226
9  llc               0x00000001007ef43e
llvm::SelectionDAGLowering::visitSwitch(llvm::SwitchInst&) + 1036
10 llc               0x00000001007f02c9
llvm::SelectionDAGLowering::visit(unsigned int, llvm::User&) + 363
11 llc               0x00000001007f06e4
llvm::SelectionDAGLowering::visit(llvm::Instruction&) + 44
12 llc               0x000000010080afd0
llvm::SelectionDAGISel::SelectBasicBlock(llvm::BasicBlock*,
llvm::ilist_iterator<llvm::Instruction>,
llvm::ilist_iterator<llvm::Instruction>) + 716
13 llc               0x000000010080bb94
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function&,
llvm::MachineFunction&, llvm::MachineModuleInfo*, llvm::DwarfWriter*,
llvm::TargetInstrInfo const&) + 2684
14 llc               0x000000010080ca41
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) + 989
15 llc               0x00000001008e1e01
llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 83
16 llc               0x0000000100b3de26
llvm::FPPassManager::runOnFunction(llvm::Function&) + 336
17 llc               0x0000000100b3fc03
llvm::FunctionPassManagerImpl::run(llvm::Function&) + 111
18 llc               0x0000000100b3fdb2
llvm::FunctionPassManager::run(llvm::Function&) + 112
19 llc               0x0000000100030511 main + 3256
20 llc               0x000000010002f114 start + 52
21 llc               0x0000000000000001 start + 4294774561
Stack dump:
0.      Program arguments: llc 
1.      Running pass 'X86 DAG->DAG Instruction Selection' on function '@f0'
Abort trap
ddunbar at giles:tmp$ 
--

(from llvm-gcc compile of clang).


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list