[ARM] Add Thumb-2 code size optimization test for ASR (register).
authorTilmann Scheller <t.scheller@samsung.com>
Fri, 29 Aug 2014 17:19:00 +0000 (17:19 +0000)
committerTilmann Scheller <t.scheller@samsung.com>
Fri, 29 Aug 2014 17:19:00 +0000 (17:19 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216746 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGen/ARM/thumb2-size-opt.ll

index bc7e6ef9e1aa72fb41c923fe7cab4acc3594af56..e201cd5159f913488628054f6d2250bf6a64c967 100644 (file)
@@ -18,3 +18,12 @@ entry:
   %shr = ashr i32 %a, 13
   ret i32 %shr
 }
+
+define i32 @asr-reg(i32 %a, i32 %b) nounwind readnone {
+; CHECK-LABEL: "asr-reg":
+; CHECK: asr.w r{{[0-9]+}}, r{{[0-9]+}}, r{{[0-9]+}} @ encoding: [{{0x..,0x..,0x..,0x..}}]
+; CHECK-OPT: asrs r{{[0-7]}}, r{{[0-7]}} @ encoding: [{{0x..,0x..}}]
+entry:
+  %shr = ashr i32 %a, %b
+  ret i32 %shr
+}