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.
Created attachment 837 [details] testcase to reproduce the assertion
Created attachment 838 [details] llc debug output
Mine
I suppose, the problem is that there are no jump tables on these systems, am I right?
Fixed with: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070507/049462.html http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070507/049463.html Thanks!