From c3b3cd8d6899e345dc9792b57c2b1b78b3f3635e Mon Sep 17 00:00:00 2001 From: Richard Earnshaw Date: Mon, 20 Aug 2012 10:57:45 +0000 Subject: [PATCH] thumb-16bit-ops.c (f): This test uses a 16-bit add instruction. * gcc.target/arm/thumb-16bit-ops.c (f): This test uses a 16-bit add instruction. (f2): New test that really does need adds. From-SVN: r190530 --- gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/gcc.target/arm/thumb-16bit-ops.c | 11 +++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ba0b5b2aa31..e9aaf243950 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2012-08-20 Richard Earnshaw + + * gcc.target/arm/thumb-16bit-ops.c (f): This test uses a 16-bit + add instruction. + (f2): New test that really does need adds. + 2012-08-20 Richard Guenther PR tree-optimization/54327 diff --git a/gcc/testsuite/gcc.target/arm/thumb-16bit-ops.c b/gcc/testsuite/gcc.target/arm/thumb-16bit-ops.c index bd4f4897f35..90407eb6872 100644 --- a/gcc/testsuite/gcc.target/arm/thumb-16bit-ops.c +++ b/gcc/testsuite/gcc.target/arm/thumb-16bit-ops.c @@ -4,13 +4,20 @@ /* { dg-options "-Os -fno-builtin -mthumb" } */ int -f (int a, int b ) +f (int a, int b) { return a + b; } -/* { dg-final { scan-assembler "adds r0, r0, r1" } } */ +/* { dg-final { scan-assembler "add r0, r0, r1" } } */ +int +f2 (int a, int b, int c) +{ + return b + c; +} + +/* { dg-final { scan-assembler "adds r0, r1, r2" } } */ int g1 (int a) { -- 2.34.1