From 171bd260610c63a40ea9bbfe1a0766b859644f78 Mon Sep 17 00:00:00 2001 From: Tilmann Scheller Date: Thu, 11 Sep 2014 10:42:17 +0000 Subject: [PATCH] [ARM] Add Thumb-2 code size optimization regression test for LSR (immediate). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217581 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/ARM/thumb2-size-opt.ll | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/CodeGen/ARM/thumb2-size-opt.ll b/test/CodeGen/ARM/thumb2-size-opt.ll index 4d9c0603e85..a6fdbc8c1a2 100644 --- a/test/CodeGen/ARM/thumb2-size-opt.ll +++ b/test/CodeGen/ARM/thumb2-size-opt.ll @@ -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 +} -- 2.40.0