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

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

index 12280a91c8f46cda36e6f37b7dd3f97fa96eaeeb..4d9c0603e8597054a79f749df0aba3786468f408 100644 (file)
@@ -55,3 +55,12 @@ entry:
   %shl = shl i32 %a, 13
   ret i32 %shl
 }
+
+define i32 @lsl-reg(i32 %a, i32 %b) nounwind readnone {
+; CHECK-LABEL: "lsl-reg":
+; CHECK: lsl.w r{{[0-9]+}}, r{{[0-9]+}}, r{{[0-9]+}} @ encoding: [{{0x..,0x..,0x..,0x..}}]
+; CHECK-OPT: lsls r{{[0-7]}}, r{{[0-7]}}  @ encoding: [{{0x..,0x..}}]
+entry:
+  %shl = shl i32 %a, %b
+  ret i32 %shl
+}