[llvm-commits] CVS: llvm/utils/TableGen/DAGISelEmitter.cpp

Chris Lattner clattner at apple.com
Tue May 15 11:28:05 PDT 2007

>>   If the bug was with ISD::Constant's,
>> this is a serious bug and this is not the right fix.
> Huh? It has nothing to do with ISD::Constants. Remember
> PredicateOperand with ExecuteAlways value is not part of the target
> independent DAG.  So something like this:
> def BL : I<(ops i32imm:$func, pred:$p, variable_ops), ...>
> The input node should have 2 operands (plus one if it has the
> optional flag) plus the variable ops. The emit code has like this:
>    for (unsigned i = 2, e = N.getNumOperands()-(HasInFlag?1:0); i !=
> e; ++i) {
>      AddToISelQueue(N.getOperand(i));
>      Ops0.push_back(N.getOperand(i));
>    }
> If we don't discount NumEAInputs (i.e. 1 in this case, to account for
> the single ExecuteAlways value), i's starting value is 3 and that's  
> bad.

Ahhh, so you're trying to avoid stepping on operands that don't  
exist... you're not trying to avoid selecting some operands that do  
exist?  If so, that makes sense :)


More information about the llvm-commits mailing list