diff --git a/test/CodeGen/ARM/thumb2-size-opt.ll b/test/CodeGen/ARM/thumb2-size-opt.ll new file mode 100644 index 00000000000..f98eb924a67 --- /dev/null +++ b/test/CodeGen/ARM/thumb2-size-opt.ll @@ -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 +} +