summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNate Begeman <natebegeman@mac.com>2005-10-21 06:36:18 +0000
committerNate Begeman <natebegeman@mac.com>2005-10-21 06:36:18 +0000
commitfd0d55ec69560679e73f4bef9b558b3a2e1c1626 (patch)
treeefd7acae751257739bf29534aac5355993d67886
parent5df0e36e98c96892700e19bd6225d9be5eae2ccf (diff)
downloadbcm5719-llvm-fd0d55ec69560679e73f4bef9b558b3a2e1c1626.tar.gz
bcm5719-llvm-fd0d55ec69560679e73f4bef9b558b3a2e1c1626.zip
Match rotate. This does actually match the rotates in an rc5 cipher, but I
haven't seen it fire on our testsuite. llvm-svn: 23863
-rw-r--r--llvm/lib/Target/PowerPC/PPCInstrInfo.td3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCInstrInfo.td b/llvm/lib/Target/PowerPC/PPCInstrInfo.td
index 61be2ea648e..97beafb4e54 100644
--- a/llvm/lib/Target/PowerPC/PPCInstrInfo.td
+++ b/llvm/lib/Target/PowerPC/PPCInstrInfo.td
@@ -742,6 +742,9 @@ def : Pat<(or GPRC:$in, imm:$imm),
// XOR an arbitrary immediate.
def : Pat<(xor GPRC:$in, imm:$imm),
(XORIS (XORI GPRC:$in, (LO16 imm:$imm)), (HI16 imm:$imm))>;
+def : Pat<(or (shl GPRC:$rS, GPRC:$rB),
+ (srl GPRC:$rS, (sub 32, GPRC:$rB))),
+ (RLWNM GPRC:$rS, GPRC:$rB, 0, 31)>;
def : Pat<(zext GPRC:$in),
(RLDICL (OR4To8 GPRC:$in, GPRC:$in), 0, 32)>;
OpenPOWER on IntegriCloud