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 | ea874f3306c26ed425c05b2de202a176e2f32ed2 (patch) | |
tree | 46ce7a575da822c7ea449915bf48dcc97bb0d5ef /lib/Target | |
parent | 72fe91c4dddf0e40317bfd8ceeaf7af8622cc1ae (diff) | |
download | external_llvm-ea874f3306c26ed425c05b2de202a176e2f32ed2.zip external_llvm-ea874f3306c26ed425c05b2de202a176e2f32ed2.tar.gz external_llvm-ea874f3306c26ed425c05b2de202a176e2f32ed2.tar.bz2 |
Teach the dag isel generator how to construct arbitrary immediates. The
generated isel now tries li then lis, then lis+ori.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23418 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r-- | lib/Target/PowerPC/PPCInstrInfo.td | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Target/PowerPC/PPCInstrInfo.td b/lib/Target/PowerPC/PPCInstrInfo.td index 705fcea..23920e1 100644 --- a/lib/Target/PowerPC/PPCInstrInfo.td +++ b/lib/Target/PowerPC/PPCInstrInfo.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))), |