[ARM] Add a first test for the Thumb-2 code size optimization pass.
[oota-llvm.git] / test / CodeGen / ARM / thumb2-size-opt.ll
1 ; RUN: llc -mtriple=thumbv7-linux-gnueabihf -o - -show-mc-encoding -t2-reduce-limit2=0 %s | FileCheck %s
2 ; RUN: llc -mtriple=thumbv7-linux-gnueabihf -o - -show-mc-encoding %s | FileCheck %s --check-prefix=CHECK-OPT
3
4 define i32 @and(i32 %a, i32 %b) nounwind readnone {
5 ; CHECK-LABEL: and:
6 ; CHECK: and.w r{{[0-9]+}}, r{{[0-9]+}}, r{{[0-9]+}} @ encoding: [{{0x..,0x..,0x..,0x..}}]
7 ; CHECK-OPT: ands r{{[0-9]+}}, r{{[0-9]+}}  @ encoding: [{{0x..,0x..}}]
8 entry:
9   %and = and i32 %b, %a
10   ret i32 %and
11 }
12