Match rotate. This does actually match the rotates in an rc5 cipher, but I
authorNate Begeman <natebegeman@mac.com>
Fri, 21 Oct 2005 06:36:18 +0000 (06:36 +0000)
committerNate Begeman <natebegeman@mac.com>
Fri, 21 Oct 2005 06:36:18 +0000 (06:36 +0000)
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

lib/Target/PowerPC/PPCInstrInfo.td

index 61be2ea648e5a480b3a6448ccc214b36f7f2c7b9..97beafb4e54f9e3f6190460e11903a4340e3ff4f 100644 (file)
@@ -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)>;