aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/Thumb2/thumb2-pack.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/Thumb2/thumb2-pack.ll')
-rw-r--r--test/CodeGen/Thumb2/thumb2-pack.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/CodeGen/Thumb2/thumb2-pack.ll b/test/CodeGen/Thumb2/thumb2-pack.ll
index b3be923ab1..d3e29c897e 100644
--- a/test/CodeGen/Thumb2/thumb2-pack.ll
+++ b/test/CodeGen/Thumb2/thumb2-pack.ll
@@ -86,3 +86,12 @@ define i32 @test7(i32 %X, i32 %Y) {
%tmp57 = or i32 %tmp4, %tmp1 ; <i32> [#uses=1]
ret i32 %tmp57
}
+
+; CHECK: test8
+; CHECK: pkhtb r0, r0, r1, asr #22
+define i32 @test8(i32 %X, i32 %Y) {
+ %tmp1 = and i32 %X, -65536
+ %tmp3 = lshr i32 %Y, 22
+ %tmp57 = or i32 %tmp3, %tmp1
+ ret i32 %tmp57
+}