diff options
| author | Chris Lattner <sabre@nondot.org> | 2005-09-24 00:41:58 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2005-09-24 00:41:58 +0000 |
| commit | 6736a6cdd28c807b9600a9c163ba1f8b52bc53ca (patch) | |
| tree | ef75970484dac838eaaafb4f573af159a743f506 /llvm/lib | |
| parent | 0afb14cade119cae07ff15cd0d0c5ee4a03be639 (diff) | |
| download | bcm5719-llvm-6736a6cdd28c807b9600a9c163ba1f8b52bc53ca.tar.gz bcm5719-llvm-6736a6cdd28c807b9600a9c163ba1f8b52bc53ca.zip | |
Teach the dag isel generator how to construct arbitrary immediates. The
generated isel now tries li then lis, then lis+ori.
llvm-svn: 23418
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/PowerPC/PowerPCInstrInfo.td | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/Target/PowerPC/PowerPCInstrInfo.td b/llvm/lib/Target/PowerPC/PowerPCInstrInfo.td index 705fcea76ae..23920e1bf0a 100644 --- a/llvm/lib/Target/PowerPC/PowerPCInstrInfo.td +++ b/llvm/lib/Target/PowerPC/PowerPCInstrInfo.td @@ -774,7 +774,12 @@ def : Pat<(or GPRC:$in, imm:$imm), def : Pat<(xor GPRC:$in, imm:$imm), (XORIS (XORI GPRC:$in, (LO16 imm:$imm)), (HI16 imm:$imm))>; -// Same as above, but using a temporary. +// Arbitrary immediate support. +def : Pat<(i32 imm:$imm), + (ORI (LIS (HI16 imm:$imm)), (LO16 imm:$imm))>; + + +// Same as above, but using a temporary. FIXME: implement temporaries :) /* def : Pattern<(xor GPRC:$in, imm:$imm), [(set GPRC:$tmp, (XORI GPRC:$in, (LO16 imm:$imm))), |

