Displaying 3 results from an estimated 3 matches for "orir32".
2007 Jan 09
3
[LLVMdev] Pattern matching questions
...out the
"$" or the extra "bi" operands?
- Immediates in a pattern: To move one register to another involves
using the 3-operand OR instruction, but how do I encode an immediate
w/o a type inference contradiction?
def : Pat<(set R32C:$rDest, R32C:$rSrc),
(ORIr32 R32C:$rSrc, 0)>;
Thanks for the clue!
2007 Jan 09
0
[LLVMdev] Pattern matching questions
...;$", "lr")).
>
> - Immediates in a pattern: To move one register to another involves
> using the 3-operand OR instruction, but how do I encode an immediate
> w/o a type inference contradiction?
>
> def : Pat<(set R32C:$rDest, R32C:$rSrc),
> (ORIr32 R32C:$rSrc, 0)>;
I am not sure what you mean. By 3-operand, you mean 2 source operand
and 1 destination. I don't think the error you are seeing have
anything to do with the immediate. For a def : Pat pattern, you don't
need to specify the "set R32C:$rDest" portion.
Evan...
2007 Jan 09
2
[LLVMdev] Pattern matching questions
...ld work.
>> - Immediates in a pattern: To move one register to another involves
>> using the 3-operand OR instruction, but how do I encode an immediate
>> w/o a type inference contradiction?
>>
>> def : Pat<(set R32C:$rDest, R32C:$rSrc),
>> (ORIr32 R32C:$rSrc, 0)>;
You current cannot specify move patterns in the .td file. You specify
them with XXXRegisterInfo::copyRegToReg and XXXInstrInfo::isMoveInstr.
See the PPC or Sparc backend for some simple examples.
-Chris
--
http://nondot.org/sabre/
http://llvm.org/