public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/54295] New: [4.7 regression] Widening multiply-accumulate operation uses wrong value extension
@ 2012-08-17 12:46 rearnsha at gcc dot gnu.org
2012-08-17 12:47 ` [Bug tree-optimization/54295] " rearnsha at gcc dot gnu.org
` (11 more replies)
0 siblings, 12 replies; 13+ messages in thread
From: rearnsha at gcc dot gnu.org @ 2012-08-17 12:46 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54295
Bug #: 54295
Summary: [4.7 regression] Widening multiply-accumulate
operation uses wrong value extension
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: rearnsha@gcc.gnu.org
Target: arm aarch64
A widening multiply-accumulate operation can generate an incorrect result if
there are casts in expression.
Compile the attached test-case on ARM at -O2, the result is:
$./a.out
<aborted>
Correct result, as seen at -O1 is
$./a.out
$
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/54295] [4.7 regression] Widening multiply-accumulate operation uses wrong value extension
2012-08-17 12:46 [Bug tree-optimization/54295] New: [4.7 regression] Widening multiply-accumulate operation uses wrong value extension rearnsha at gcc dot gnu.org
@ 2012-08-17 12:47 ` rearnsha at gcc dot gnu.org
2012-08-17 12:50 ` rearnsha at gcc dot gnu.org
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rearnsha at gcc dot gnu.org @ 2012-08-17 12:47 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54295
--- Comment #1 from Richard Earnshaw <rearnsha at gcc dot gnu.org> 2012-08-17 12:47:35 UTC ---
Created attachment 28042
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28042
Testcase
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/54295] [4.7 regression] Widening multiply-accumulate operation uses wrong value extension
2012-08-17 12:46 [Bug tree-optimization/54295] New: [4.7 regression] Widening multiply-accumulate operation uses wrong value extension rearnsha at gcc dot gnu.org
2012-08-17 12:47 ` [Bug tree-optimization/54295] " rearnsha at gcc dot gnu.org
@ 2012-08-17 12:50 ` rearnsha at gcc dot gnu.org
2012-08-17 13:13 ` [Bug tree-optimization/54295] [4.7/4.8 " rguenth at gcc dot gnu.org
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rearnsha at gcc dot gnu.org @ 2012-08-17 12:50 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54295
--- Comment #2 from Richard Earnshaw <rearnsha at gcc dot gnu.org> 2012-08-17 12:50:32 UTC ---
Testing a fix
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/54295] [4.7/4.8 regression] Widening multiply-accumulate operation uses wrong value extension
2012-08-17 12:46 [Bug tree-optimization/54295] New: [4.7 regression] Widening multiply-accumulate operation uses wrong value extension rearnsha at gcc dot gnu.org
2012-08-17 12:47 ` [Bug tree-optimization/54295] " rearnsha at gcc dot gnu.org
2012-08-17 12:50 ` rearnsha at gcc dot gnu.org
@ 2012-08-17 13:13 ` rguenth at gcc dot gnu.org
2012-08-20 12:50 ` rearnsha at gcc dot gnu.org
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-08-17 13:13 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54295
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.7.2
Summary|[4.7 regression] Widening |[4.7/4.8 regression]
|multiply-accumulate |Widening
|operation uses wrong value |multiply-accumulate
|extension |operation uses wrong value
| |extension
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/54295] [4.7/4.8 regression] Widening multiply-accumulate operation uses wrong value extension
2012-08-17 12:46 [Bug tree-optimization/54295] New: [4.7 regression] Widening multiply-accumulate operation uses wrong value extension rearnsha at gcc dot gnu.org
` (2 preceding siblings ...)
2012-08-17 13:13 ` [Bug tree-optimization/54295] [4.7/4.8 " rguenth at gcc dot gnu.org
@ 2012-08-20 12:50 ` rearnsha at gcc dot gnu.org
2012-08-20 14:13 ` rearnsha at gcc dot gnu.org
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rearnsha at gcc dot gnu.org @ 2012-08-20 12:50 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54295
--- Comment #3 from Richard Earnshaw <rearnsha at gcc dot gnu.org> 2012-08-20 12:49:55 UTC ---
Author: rearnsha
Date: Mon Aug 20 12:49:47 2012
New Revision: 190533
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190533
Log:
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.
Added:
trunk/gcc/testsuite/gcc.c-torture/execute/20120817-1.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-math-opts.c
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/54295] [4.7/4.8 regression] Widening multiply-accumulate operation uses wrong value extension
2012-08-17 12:46 [Bug tree-optimization/54295] New: [4.7 regression] Widening multiply-accumulate operation uses wrong value extension rearnsha at gcc dot gnu.org
` (3 preceding siblings ...)
2012-08-20 12:50 ` rearnsha at gcc dot gnu.org
@ 2012-08-20 14:13 ` rearnsha at gcc dot gnu.org
2012-09-04 19:43 ` ramana at gcc dot gnu.org
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rearnsha at gcc dot gnu.org @ 2012-08-20 14:13 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54295
--- Comment #4 from Richard Earnshaw <rearnsha at gcc dot gnu.org> 2012-08-20 14:13:40 UTC ---
Author: rearnsha
Date: Mon Aug 20 14:13:16 2012
New Revision: 190534
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190534
Log:
PR tree-ssa/54295
* tree-ssa-math-opts.c (is_widening_mult_rhs_p): Delete rhs_code
declaration and setter.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-ssa-math-opts.c
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/54295] [4.7/4.8 regression] Widening multiply-accumulate operation uses wrong value extension
2012-08-17 12:46 [Bug tree-optimization/54295] New: [4.7 regression] Widening multiply-accumulate operation uses wrong value extension rearnsha at gcc dot gnu.org
` (4 preceding siblings ...)
2012-08-20 14:13 ` rearnsha at gcc dot gnu.org
@ 2012-09-04 19:43 ` ramana at gcc dot gnu.org
2012-09-07 10:31 ` [Bug tree-optimization/54295] [4.7 Regression] " rguenth at gcc dot gnu.org
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: ramana at gcc dot gnu.org @ 2012-09-04 19:43 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54295
Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-09-04
CC| |ramana at gcc dot gnu.org
Ever Confirmed|0 |1
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/54295] [4.7 Regression] Widening multiply-accumulate operation uses wrong value extension
2012-08-17 12:46 [Bug tree-optimization/54295] New: [4.7 regression] Widening multiply-accumulate operation uses wrong value extension rearnsha at gcc dot gnu.org
` (5 preceding siblings ...)
2012-09-04 19:43 ` ramana at gcc dot gnu.org
@ 2012-09-07 10:31 ` rguenth at gcc dot gnu.org
2012-09-07 10:37 ` rearnsha at gcc dot gnu.org
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-09-07 10:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54295
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
Summary|[4.7/4.8 regression] |[4.7 Regression] Widening
|Widening |multiply-accumulate
|multiply-accumulate |operation uses wrong value
|operation uses wrong value |extension
|extension |
--- Comment #5 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-09-07 10:31:13 UTC ---
Fixed on trunk sofar.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/54295] [4.7 Regression] Widening multiply-accumulate operation uses wrong value extension
2012-08-17 12:46 [Bug tree-optimization/54295] New: [4.7 regression] Widening multiply-accumulate operation uses wrong value extension rearnsha at gcc dot gnu.org
` (6 preceding siblings ...)
2012-09-07 10:31 ` [Bug tree-optimization/54295] [4.7 Regression] " rguenth at gcc dot gnu.org
@ 2012-09-07 10:37 ` rearnsha at gcc dot gnu.org
2012-09-20 10:18 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rearnsha at gcc dot gnu.org @ 2012-09-07 10:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54295
--- Comment #6 from Richard Earnshaw <rearnsha at gcc dot gnu.org> 2012-09-07 10:37:12 UTC ---
Author: rearnsha
Date: Fri Sep 7 10:37:08 2012
New Revision: 191066
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=191066
Log:
PR tree-ssa/54295
* tree-ssa-math-opts.c (widening_mult_conversion_strippable_p):
Sign-extension of a zero-extended value can be simplified to
just zero-extension.
testsuite:
* gcc.target/arm/pr50318-1.c: Scan for smlal.
* gcc.target/arm/smlaltb-1.c: XFAIL test.
* gcc.target/arm/smlaltt-1.c: Likewise.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.target/arm/pr50318-1.c
trunk/gcc/testsuite/gcc.target/arm/smlaltb-1.c
trunk/gcc/testsuite/gcc.target/arm/smlaltt-1.c
trunk/gcc/tree-ssa-math-opts.c
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/54295] [4.7 Regression] Widening multiply-accumulate operation uses wrong value extension
2012-08-17 12:46 [Bug tree-optimization/54295] New: [4.7 regression] Widening multiply-accumulate operation uses wrong value extension rearnsha at gcc dot gnu.org
` (7 preceding siblings ...)
2012-09-07 10:37 ` rearnsha at gcc dot gnu.org
@ 2012-09-20 10:18 ` jakub at gcc dot gnu.org
2013-04-11 7:59 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-09-20 10:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54295
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.7.2 |4.7.3
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-09-20 10:14:21 UTC ---
GCC 4.7.2 has been released.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/54295] [4.7 Regression] Widening multiply-accumulate operation uses wrong value extension
2012-08-17 12:46 [Bug tree-optimization/54295] New: [4.7 regression] Widening multiply-accumulate operation uses wrong value extension rearnsha at gcc dot gnu.org
` (8 preceding siblings ...)
2012-09-20 10:18 ` jakub at gcc dot gnu.org
@ 2013-04-11 7:59 ` rguenth at gcc dot gnu.org
2013-04-29 12:56 ` jogo at openwrt dot org
2014-06-12 13:16 ` rguenth at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-04-11 7:59 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54295
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.7.3 |4.7.4
--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> 2013-04-11 07:59:05 UTC ---
GCC 4.7.3 is being released, adjusting target milestone.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/54295] [4.7 Regression] Widening multiply-accumulate operation uses wrong value extension
2012-08-17 12:46 [Bug tree-optimization/54295] New: [4.7 regression] Widening multiply-accumulate operation uses wrong value extension rearnsha at gcc dot gnu.org
` (9 preceding siblings ...)
2013-04-11 7:59 ` rguenth at gcc dot gnu.org
@ 2013-04-29 12:56 ` jogo at openwrt dot org
2014-06-12 13:16 ` rguenth at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: jogo at openwrt dot org @ 2013-04-29 12:56 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54295
Jonas Gorski <jogo at openwrt dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jogo at openwrt dot org
--- Comment #9 from Jonas Gorski <jogo at openwrt dot org> 2013-04-29 12:56:23 UTC ---
I want to confirm that this is still an issue in 4.7.3, also applies to at
least mips32 (did not test mips64) and causes miscompilations in the linux
kernel there.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/54295] [4.7 Regression] Widening multiply-accumulate operation uses wrong value extension
2012-08-17 12:46 [Bug tree-optimization/54295] New: [4.7 regression] Widening multiply-accumulate operation uses wrong value extension rearnsha at gcc dot gnu.org
` (10 preceding siblings ...)
2013-04-29 12:56 ` jogo at openwrt dot org
@ 2014-06-12 13:16 ` rguenth at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-06-12 13:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54295
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Known to work| |4.8.0
Resolution|--- |FIXED
Target Milestone|4.7.4 |4.8.0
--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed for 4.8.0.
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2014-06-12 13:16 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-17 12:46 [Bug tree-optimization/54295] New: [4.7 regression] Widening multiply-accumulate operation uses wrong value extension rearnsha at gcc dot gnu.org
2012-08-17 12:47 ` [Bug tree-optimization/54295] " rearnsha at gcc dot gnu.org
2012-08-17 12:50 ` rearnsha at gcc dot gnu.org
2012-08-17 13:13 ` [Bug tree-optimization/54295] [4.7/4.8 " rguenth at gcc dot gnu.org
2012-08-20 12:50 ` rearnsha at gcc dot gnu.org
2012-08-20 14:13 ` rearnsha at gcc dot gnu.org
2012-09-04 19:43 ` ramana at gcc dot gnu.org
2012-09-07 10:31 ` [Bug tree-optimization/54295] [4.7 Regression] " rguenth at gcc dot gnu.org
2012-09-07 10:37 ` rearnsha at gcc dot gnu.org
2012-09-20 10:18 ` jakub at gcc dot gnu.org
2013-04-11 7:59 ` rguenth at gcc dot gnu.org
2013-04-29 12:56 ` jogo at openwrt dot org
2014-06-12 13:16 ` rguenth at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).