summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-09-26 22:20:16 +0000
committerChris Lattner <sabre@nondot.org>2005-09-26 22:20:16 +0000
commit30e21a46f00e638b2fdafb394058e1e6355f4e70 (patch)
treed29a6ddade7c9837f08cd254c9bb8e5601a28ac3
parentfab372880199de4a71b8e3ce8a6b8a53c85baa60 (diff)
downloadexternal_llvm-30e21a46f00e638b2fdafb394058e1e6355f4e70.zip
external_llvm-30e21a46f00e638b2fdafb394058e1e6355f4e70.tar.gz
external_llvm-30e21a46f00e638b2fdafb394058e1e6355f4e70.tar.bz2
minor pattern shuffling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23458 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/PowerPC/PPCInstrInfo.td11
1 files changed, 3 insertions, 8 deletions
diff --git a/lib/Target/PowerPC/PPCInstrInfo.td b/lib/Target/PowerPC/PPCInstrInfo.td
index 23920e1..d4d584e 100644
--- a/lib/Target/PowerPC/PPCInstrInfo.td
+++ b/lib/Target/PowerPC/PPCInstrInfo.td
@@ -182,7 +182,6 @@ class Pattern<dag patternToMatch, list<dag> resultInstrs> {
// not needing a full list.
class Pat<dag pattern, dag result> : Pattern<pattern, [result]>;
-
//===----------------------------------------------------------------------===//
// PowerPC specific transformation functions and pattern fragments.
//
@@ -763,9 +762,9 @@ def RLDICR : MDForm_1<30, 1,
// PowerPC Instruction Patterns
//
-// REDUNDANT WITH INSTRUCTION DEFINITION, ONLY FOR TESTING.
-def : Pat<(sext_inreg GPRC:$in, i8),
- (EXTSB GPRC:$in)>;
+// Arbitrary immediate support. Implement in terms of LIS/ORI.
+def : Pat<(i32 imm:$imm),
+ (ORI (LIS (HI16 imm:$imm)), (LO16 imm:$imm))>;
// or by an arbitrary immediate.
def : Pat<(or GPRC:$in, imm:$imm),
@@ -774,10 +773,6 @@ def : Pat<(or GPRC:$in, imm:$imm),
def : Pat<(xor GPRC:$in, imm:$imm),
(XORIS (XORI GPRC:$in, (LO16 imm:$imm)), (HI16 imm:$imm))>;
-// 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 :)
/*