summaryrefslogtreecommitdiff
path: root/test/CodeGen/ARM/pack.ll
diff options
context:
space:
mode:
authorArnold Schwaighofer <aschwaighofer@apple.com>2013-07-05 18:57:49 +0000
committerArnold Schwaighofer <aschwaighofer@apple.com>2013-07-05 18:57:49 +0000
commitfe3b2995aa38b25bada9fa2e850590b3988668b5 (patch)
treec911753ad5f9be8212b139e980975c602593cf5c /test/CodeGen/ARM/pack.ll
parentffd3bb8f0d875f4aae3097660f973b1e7512ee05 (diff)
ARM: Add a pack pattern for matching arithmetic shift right
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185714 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/ARM/pack.ll')
-rw-r--r--test/CodeGen/ARM/pack.ll10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/CodeGen/ARM/pack.ll b/test/CodeGen/ARM/pack.ll
index b94414328ca..f6cc75e04f0 100644
--- a/test/CodeGen/ARM/pack.ll
+++ b/test/CodeGen/ARM/pack.ll
@@ -99,3 +99,13 @@ entry:
%tmp3 = or i32 %tmp, %tmp2
ret i32 %tmp3
}
+
+; CHECK: test10:
+; CHECK: pkhtb r0, r0, r1, asr #17
+define i32 @test10(i32 %src1, i32 %src2) {
+entry:
+ %tmp = and i32 %src1, -65536
+ %tmp2 = ashr i32 %src2, 17
+ %tmp3 = or i32 %tmp, %tmp2
+ ret i32 %tmp3
+}