[llvm-commits] [llvm] r51699 - in /llvm/trunk: lib/Target/Target.td lib/Target/TargetSelectionDAG.td lib/Target/X86/X86ISelDAGToDAG.cpp lib/Target/X86/X86InstrInfo.td utils/TableGen/CodeGenDAGPatterns.cpp utils/TableGen/CodeGenInstruction.cpp utils/TableGen/DAGISelEmitter.cpp utils/TableGen/InstrInfoEmitter.cpp

Dan Gohman gohman at apple.com
Fri May 30 10:57:39 PDT 2008


On May 29, 2008, at 6:52 PM, Chris Lattner wrote:
>> +def immAllZeros : PatLeaf<(imm), [{ return N->isNullValue(); }]>;
>
>> @@ -322,9 +322,9 @@
>> // Return instructions.
>> let isTerminator = 1, isReturn = 1, isBarrier = 1,
>>    hasCtrlDep = 1, FPForm = SpecialFP, FPFormBits = SpecialFP.Value
>> in {
>> -  def RET    : I   <0xC3, RawFrm, (outs), (ins variable_ops),
>> +  def RET    : I   <0xC3, RawFrm, (outs), (ins discard:$amt,
>> variable_ops),
>>                    "ret",
>> -                    [/*(X86retflag 0)*/ /*FIXME: Disabled: rdar://5791600*/
>> ]>;
>> +                    [(X86retflag immAllZeros:$amt)]>;
>
> Does it work if you just use '0' instead of immAllZeros or do you need
> a name?  Does 0:$amt work?

Actually, thinking about this more, I realized this fix is only  
addressing
a symptom of a larger problem, that of assuming that tblgen can infer
the structure of the input patching pattern just by looking at the  
output
pattern. I'll work on a better fix, which will make immAllZeros
unnecessary.

Dan




More information about the llvm-commits mailing list