[ARM] Add Thumb-2 code size optimization regression test for LSR (immediate).
authorTilmann Scheller <t.scheller@samsung.com>
Thu, 11 Sep 2014 10:42:17 +0000 (10:42 +0000)
committerTilmann Scheller <t.scheller@samsung.com>
Thu, 11 Sep 2014 10:42:17 +0000 (10:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217581 91177308-0d34-0410-b5e6-96231b3b80d8

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

index 4d9c0603e8597054a79f749df0aba3786468f408..a6fdbc8c1a28bf854c756c5d12f48ac13636ce6e 100644 (file)
@@ -64,3 +64,12 @@ entry:
   %shl = shl i32 %a, %b
   ret i32 %shl
 }
+
+define i32 @lsr-imm(i32 %a) nounwind readnone {
+; CHECK-LABEL: "lsr-imm":
+; CHECK: lsr.w r{{[0-9]+}}, r{{[0-9]+}}, #13 @ encoding: [{{0x..,0x..,0x..,0x..}}]
+; CHECK-OPT: lsrs r{{[0-7]}}, r{{[0-7]}}, #13  @ encoding: [{{0x..,0x..}}]
+entry:
+  %shr = lshr i32 %a, 13
+  ret i32 %shr
+}