LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 1403 - SPARC and IA64 backend: assertion fails when compiling switch-case
Summary: SPARC and IA64 backend: assertion fails when compiling switch-case
Status: RESOLVED FIXED
Alias: None
Product: new-bugs
Classification: Unclassified
Component: new bugs (show other bugs)
Version: unspecified
Hardware: PC Linux
: P normal
Assignee: Anton Korobeynikov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-09 06:34 PDT by Veli-Pekka Jaaskelainen
Modified: 2010-02-22 12:49 PST (History)
2 users (show)

See Also:
Fixed By Commit(s):


Attachments
testcase to reproduce the assertion (219 bytes, text/plain)
2007-05-09 06:36 PDT, Veli-Pekka Jaaskelainen
Details
llc debug output (2.65 KB, text/plain)
2007-05-09 06:38 PDT, Veli-Pekka Jaaskelainen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Veli-Pekka Jaaskelainen 2007-05-09 06:34:35 PDT
The following assertion fails with 2.0 CVS branch when compiling a simple
switch-case with four cases. At least IA64 and Sparc backends are affected.
Compiles fine with x86 and PPC backends.

llc: SelectionDAGISel.cpp:1626: bool
llvm::SelectionDAGLowering::handleBTSplitSwitchCase(llvm::SelectionDAGLowering::CaseRec&,
std::vector<llvm::SelectionDAGLowering::CaseRec,
std::allocator<llvm::SelectionDAGLowering::CaseRec> >&, llvm::Value*,
llvm::MachineBasicBlock*): Assertion `(FMetric > 0) && "Should handle dense
range earlier!"' failed.
Comment 1 Veli-Pekka Jaaskelainen 2007-05-09 06:36:45 PDT
Created attachment 837 [details]
testcase to reproduce the assertion
Comment 2 Veli-Pekka Jaaskelainen 2007-05-09 06:38:24 PDT
Created attachment 838 [details]
llc debug output
Comment 3 Anton Korobeynikov 2007-05-09 07:10:05 PDT
Mine
Comment 4 Anton Korobeynikov 2007-05-09 07:11:15 PDT
I suppose, the problem is that there are no jump tables on these systems, am I
right?