Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

Simple code breaks with llc #1900

Closed Quuxplusone closed 14 years ago

Quuxplusone commented 15 years ago
Bugzilla Link PR4930
Status RESOLVED FIXED
Importance P normal
Reported by Bill Wendling (wendling@apple.com)
Reported on 2009-09-08 20:19:43 -0700
Last modified on 2009-11-05 13:06:23 -0800
Version trunk
Hardware Macintosh All
CC anton@korobeynikov.info, baldrick@free.fr, clattner@nondot.org, kuba.staszak@gmail.com, llvm-bugs@lists.llvm.org, wendling@apple.com
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also
$ cat t.ll
; ModuleID = 'bugpoint-reduced-simplified.bc'

define i32 @main() ssp {
entry:
  invoke void @_ZL3foov() ssp
          to label %bb6 unwind label %lpad

bb6:                                              ; preds = %entry
  ret i32 undef

lpad:                                             ; preds = %entry
  %eh_ptr = call i8* @llvm.eh.exception()       ; <i8*> [#uses=5]
  %eh_select9 = call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i8* null) ; <i32> [#uses=0]
  unreachable
}

declare void @_ZL3foov() ssp

declare i8* @llvm.eh.exception()

declare i32 @llvm.eh.selector.i32(i8*, i8*, ...) nounwind

declare i32 @__gxx_personality_v0(...)

$ llvm-as < t.ll | /Developer/usr/local/bin/llc -o - -march=x86-64
Assertion failed: (BestRC && "Couldn't find the register class"), function
getPhysicalRegisterRegClass, file /Volumes/Sandbox/llvm/Roots/llvmCore-
2204.1.roots/llvmCore-2204.1~obj/src/lib/Target/TargetRegisterInfo.cpp, line 59.
0   llc               0x0000000100812732 std::vector<llvm::sys::Path,
std::allocator<llvm::sys::Path>
>::_M_insert_aux(__gnu_cxx::__normal_iterator<llvm::sys::Path*,
std::vector<llvm::sys::Path, std::allocator<llvm::sys::Path> > >,
llvm::sys::Path const&) + 7042
1   llc               0x0000000100812dc6 std::vector<llvm::sys::Path,
std::allocator<llvm::sys::Path>
>::_M_insert_aux(__gnu_cxx::__normal_iterator<llvm::sys::Path*,
std::vector<llvm::sys::Path, std::allocator<llvm::sys::Path> > >,
llvm::sys::Path const&) + 8726
2   libSystem.B.dylib 0x00007fff8289014a _sigtramp + 26
3   libSystem.B.dylib 0x00007fff82834caa tiny_malloc_from_free_list + 1196
4   libSystem.B.dylib 0x00007fff8290c104 __pthread_markcancel + 0
5   llc               0x0000000100716cae void
std::__introsort_loop<__gnu_cxx::__normal_iterator<std::pair<unsigned int,
llvm::TargetMachineRegistryEntry const*>*, std::vector<std::pair<unsigned int,
llvm::TargetMachineRegistryEntry const*>, std::allocator<std::pair<unsigned
int, llvm::TargetMachineRegistryEntry const*> > > >,
long>(__gnu_cxx::__normal_iterator<std::pair<unsigned int,
llvm::TargetMachineRegistryEntry const*>*, std::vector<std::pair<unsigned int,
llvm::TargetMachineRegistryEntry const*>, std::allocator<std::pair<unsigned
int, llvm::TargetMachineRegistryEntry const*> > > >,
__gnu_cxx::__normal_iterator<std::pair<unsigned int,
llvm::TargetMachineRegistryEntry const*>*, std::vector<std::pair<unsigned int,
llvm::TargetMachineRegistryEntry const*>, std::allocator<std::pair<unsigned
int, llvm::TargetMachineRegistryEntry const*> > > >, long) + 1966
6   llc               0x000000010041f5fd std::vector<llvm::SUnit,
std::allocator<llvm::SUnit> >::reserve(unsigned long) + 7069
7   llc               0x0000000100421674 std::vector<llvm::SUnit,
std::allocator<llvm::SUnit> >::reserve(unsigned long) + 15380
8   llc               0x000000010042237a std::vector<llvm::SUnit,
std::allocator<llvm::SUnit> >::reserve(unsigned long) + 18714
9   llc               0x00000001004c02ea
llvm::FunctionLoweringInfo::InitializeRegForValue(llvm::Value const*) + 21466
10  llc               0x00000001004c25d7
llvm::FunctionLoweringInfo::InitializeRegForValue(llvm::Value const*) + 30407
11  llc               0x00000001004c34d9
llvm::FunctionLoweringInfo::InitializeRegForValue(llvm::Value const*) + 34249
12  llc               0x00000001004c4727
llvm::FunctionLoweringInfo::InitializeRegForValue(llvm::Value const*) + 38935
13  llc               0x00000001007a1c82 llvm::FunctionPass::~FunctionPass() +
36690
14  llc               0x00000001007a2aa0 llvm::FunctionPass::~FunctionPass() +
40304
15  llc               0x00000001007a2d77 llvm::FunctionPass::~FunctionPass() +
41031
16  llc               0x0000000100017868 std::_Rb_tree<llvm::StructValType,
std::pair<llvm::StructValType const, llvm::PATypeHolder>,
std::_Select1st<std::pair<llvm::StructValType const, llvm::PATypeHolder> >,
std::less<llvm::StructValType>, std::allocator<std::pair<llvm::StructValType
const, llvm::PATypeHolder> > >::_M_insert_unique(std::pair<llvm::StructValType
const, llvm::PATypeHolder> const&) + 18072
17  llc               0x00000001000160f8 std::_Rb_tree<llvm::StructValType,
std::pair<llvm::StructValType const, llvm::PATypeHolder>,
std::_Select1st<std::pair<llvm::StructValType const, llvm::PATypeHolder> >,
std::less<llvm::StructValType>, std::allocator<std::pair<llvm::StructValType
const, llvm::PATypeHolder> > >::_M_insert_unique(std::pair<llvm::StructValType
const, llvm::PATypeHolder> const&) + 12072
Stack dump:
0.  Program arguments: /Developer/usr/local/bin/llc -o - -march=x86-64
1.  Running pass 'X86 DAG->DAG Instruction Selection' on function '@main'
Abort trap
[bitters:llvm] /Developer/usr/local/bin/llc --version
Low Level Virtual Machine (http://llvm.org/):
  llvm version 2.6svn Apple Build #2204-01
  Optimized build with assertions.
  Built Aug 21 2009(15:46:27).
Quuxplusone commented 14 years ago

Bill, is this still an issue?

Quuxplusone commented 14 years ago

It looks like this is fixed. :-)