[LLVMbugs] [Bug 1632] New: codegen of exceptions broken on linux x86-64. Brakes gcc bootstrap

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Fri Aug 31 04:30:34 PDT 2007


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

           Summary: codegen of exceptions broken on linux x86-64. Brakes gcc
                    bootstrap
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Backend: X86
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: rafael.espindola at gmail.com
                CC: llvmbugs at cs.uiuc.edu


Compiling the following code with llvm-g++ fails:
-------------------------------------------
class c
{
};
void g();
void
f() throw()
{
      try
      {
        g();
      }
      catch (c &)
      {
      }
}
------------------------------------------
The bugpoint reduced test case is
------------------------------------------
define void @_Z1fv() {
entry:
        invoke void @_Z1gv( )
                        to label %return unwind label %unwind

unwind:         ; preds = %entry
        br i1 false, label %eh_then, label %cleanup20

eh_then:                ; preds = %unwind
        invoke void @__cxa_end_catch( )
                        to label %return unwind label %unwind10

unwind10:               ; preds = %eh_then
        %eh_select13 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector( i8*
nu\
ll, i8* bitcast (void ()* @__gxx_personality_v0 to i8*), i32 1 )         ;
<i32\
> [#uses=2]
        %tmp18 = icmp slt i32 %eh_select13, 0           ; <i1> [#uses=1]
        br i1 %tmp18, label %filter, label %cleanup20

filter:         ; preds = %unwind10
        unreachable

cleanup20:              ; preds = %unwind10, %unwind
        %eh_selector.0 = phi i32 [ 0, %unwind ], [ %eh_select13, %unwind10 ]  
\
         ; <i32> [#uses=0]
        ret void

return:         ; preds = %eh_then, %entry
        ret void
}

declare void @_Z1gv()

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

declare void @__gxx_personality_v0()

declare void @__cxa_end_catch()
------------------------------------------


And the error message is:
llvm-as  bugpoint-reduced-simplified.ll  -o - | llc -enable-eh -march=x86-64
llc: /home/espindola/llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:464: void
llvm::ScheduleDAG::AddOperand(llvm::MachineInstr*, llvm::SDOperand, unsigned
int, const llvm::TargetInstrDescriptor*, llvm::DenseMap<llvm::SDOperand,
unsigned int, llvm::DenseMapKeyInfo<llvm::SDOperand> >&): Assertion
`RegMap->getRegClass(VReg) == RC && "Register class of operand and regclass of
use don't agree!"' failed.


-- 
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