diff options
author | Richard Earnshaw <rearnsha@arm.com> | 2012-08-20 12:49:47 +0000 |
---|---|---|
committer | Richard Earnshaw <rearnsha@gcc.gnu.org> | 2012-08-20 12:49:47 +0000 |
commit | 7ab6a8280170732268c190fffb7f522c73f7b800 (patch) | |
tree | 974542ce1cddb8b6e57104203aaa61a2f96f6fcb /gcc/testsuite | |
parent | 19f757838959f060042c2db6c6dee79a930dfa5c (diff) | |
download | gcc-7ab6a8280170732268c190fffb7f522c73f7b800.zip gcc-7ab6a8280170732268c190fffb7f522c73f7b800.tar.gz gcc-7ab6a8280170732268c190fffb7f522c73f7b800.tar.bz2 |
re PR tree-optimization/54295 (Widening multiply-accumulate operation uses wrong value extension)
PR tree-ssa/54295
* tree-ssa-math-opts.c (widening_mult_conversion_strippable_p):
New function.
(is_widening_mult_rhs_p): Use it.
* gcc.c-torture/execute/20120817-1.c: New test.
From-SVN: r190533
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/20120817-1.c | 14 |
2 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e9aaf24..f33149a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2012-08-20 Richard Earnshaw <rearnsha@arm.com> + PR tree-ssa/54295 + * gcc.c-torture/execute/20120817-1.c: New test. + +2012-08-20 Richard Earnshaw <rearnsha@arm.com> + * gcc.target/arm/thumb-16bit-ops.c (f): This test uses a 16-bit add instruction. (f2): New test that really does need adds. diff --git a/gcc/testsuite/gcc.c-torture/execute/20120817-1.c b/gcc/testsuite/gcc.c-torture/execute/20120817-1.c new file mode 100644 index 0000000..8fb2820 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/20120817-1.c @@ -0,0 +1,14 @@ +typedef unsigned long long u64; +unsigned long foo = 0; +u64 f() __attribute__((noinline)); + +u64 f() { + return ((u64)40) + ((u64) 24) * (int)(foo - 1); +} + +int main () +{ + if (f () != 16) + abort (); + exit (0); +} |