[llvm] r216728 - [ARM] Add a first test for the Thumb-2 code size optimization pass.

Tilmann Scheller t.scheller at samsung.com
Fri Aug 29 08:04:40 PDT 2014


Author: tilmann
Date: Fri Aug 29 10:04:40 2014
New Revision: 216728

URL: http://llvm.org/viewvc/llvm-project?rev=216728&view=rev
Log:
[ARM] Add a first test for the Thumb-2 code size optimization pass.

While working on a Thumb-2 code size optimization I just realized that we don't have any regression tests for it.

So here's a first test case, I plan to increase the coverage over time.

Added:
    llvm/trunk/test/CodeGen/ARM/thumb2-size-opt.ll

Added: llvm/trunk/test/CodeGen/ARM/thumb2-size-opt.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/thumb2-size-opt.ll?rev=216728&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/ARM/thumb2-size-opt.ll (added)
+++ llvm/trunk/test/CodeGen/ARM/thumb2-size-opt.ll Fri Aug 29 10:04:40 2014
@@ -0,0 +1,12 @@
+; RUN: llc -mtriple=thumbv7-linux-gnueabihf -o - -show-mc-encoding -t2-reduce-limit2=0 %s | FileCheck %s
+; RUN: llc -mtriple=thumbv7-linux-gnueabihf -o - -show-mc-encoding %s | FileCheck %s --check-prefix=CHECK-OPT
+
+define i32 @and(i32 %a, i32 %b) nounwind readnone {
+; CHECK-LABEL: and:
+; CHECK: and.w r{{[0-9]+}}, r{{[0-9]+}}, r{{[0-9]+}} @ encoding: [{{0x..,0x..,0x..,0x..}}]
+; CHECK-OPT: ands r{{[0-9]+}}, r{{[0-9]+}}  @ encoding: [{{0x..,0x..}}]
+entry:
+  %and = and i32 %b, %a
+  ret i32 %and
+}
+





More information about the llvm-commits mailing list