summaryrefslogtreecommitdiff
path: root/lib
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
commitae1641c39fe9886e4b22a5d79b5a25b4041b62bd (patch)
tree5ea2b20c823913a5d30a0291fc6873881dd93686 /lib
parent63ad7963e4fc68a418cc48e21ba175a2d7093ec9 (diff)
downloadllvm-ae1641c39fe9886e4b22a5d79b5a25b4041b62bd.tar.gz
llvm-ae1641c39fe9886e4b22a5d79b5a25b4041b62bd.tar.bz2
llvm-ae1641c39fe9886e4b22a5d79b5a25b4041b62bd.tar.xz
Match rotate. This does actually match the rotates in an rc5 cipher, but I
haven't seen it fire on our testsuite. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23863 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/PowerPC/PPCInstrInfo.td3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Target/PowerPC/PPCInstrInfo.td b/lib/Target/PowerPC/PPCInstrInfo.td
index 61be2ea648..97beafb4e5 100644
--- a/lib/Target/PowerPC/PPCInstrInfo.td
+++ b/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)>;