[LLVMdev] [ia64] Assertion failed: (!OpInfo.AssignedRegs.Regs.empty() && "Couldn't allocate input reg!")

Marcel Moolenaar xcllnt at mac.com
Tue May 20 13:45:22 PDT 2008


All,

The following IR is causing the assert:

\begin{ll}
; ModuleID = 'x.bc'
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32- 
i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64- 
f80:128:128"
target triple = "ia64-portbld-freebsd8.0"

define void @__ia64_set_fast_math() nounwind  {
entry:
         tail call void asm sideeffect "mov.m ar.fpsr=$0", "r"( i64  
2709527404217215 ) nounwind
         ret void
}
\end{ll}

(See gcc/config/ia64/crtfastmath.c)

In llvm::TargetLowering::getRegForInlineAsmConstraint(), the "r"  
constraint
(i.e. TargetLowering::C_RegisterClass) isn't handled and the function  
returns
<pair>(0, NULL). However, it is explicitly called for that constraint by
llvm::SelectionDAGLowering::visitInlineAsm():

   if (OpInfo.ConstraintType == TargetLowering::C_RegisterClass)
     GetRegistersForValue(OpInfo, SawEarlyClobber, OutputRegs,  
InputRegs);

Assuming the correct fix is to enhance
llvm::TargetLowering::getRegForInlineAsmConstraint(), can someone give  
me
some pointers as to how to fix it? I have no experience with the code  
and
like to get my hands dirty...

Thanks,

BTW: Is there a cross-reference of the project somewhere?

-- 
Marcel Moolenaar
xcllnt at mac.com






More information about the llvm-dev mailing list