From 9e6f09d7ce90969e2082381368cc0b2ddb612a15 Mon Sep 17 00:00:00 2001 From: Tilmann Scheller Date: Mon, 1 Sep 2014 12:53:29 +0000 Subject: [PATCH] ARM] Add Thumb-2 code size optimization regression test for BIC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216880 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/ARM/thumb2-size-opt.ll | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/CodeGen/ARM/thumb2-size-opt.ll b/test/CodeGen/ARM/thumb2-size-opt.ll index e201cd5159f..532c3d348fc 100644 --- a/test/CodeGen/ARM/thumb2-size-opt.ll +++ b/test/CodeGen/ARM/thumb2-size-opt.ll @@ -27,3 +27,13 @@ entry: %shr = ashr i32 %a, %b ret i32 %shr } + +define i32 @bic(i32 %a, i32 %b) nounwind readnone { +; CHECK-LABEL: bic: +; CHECK: bic.w r{{[0-9]+}}, r{{[0-9]+}}, r{{[0-9]+}} @ encoding: [{{0x..,0x..,0x..,0x..}}] +; CHECK-OPT: bics r{{[0-7]}}, r{{[0-7]}} @ encoding: [{{0x..,0x..}}] +entry: + %neg = xor i32 %b, -1 + %and = and i32 %neg, %a + ret i32 %and +} -- 2.34.1