public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/54240] New: Routine hoist_adjacent_loads does not work properly after r189366
@ 2012-08-13 12:26 ysrumyan at gmail dot com
2012-08-13 12:39 ` [Bug tree-optimization/54240] " rguenth at gcc dot gnu.org
` (12 more replies)
0 siblings, 13 replies; 14+ messages in thread
From: ysrumyan at gmail dot com @ 2012-08-13 12:26 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54240
Bug #: 54240
Summary: Routine hoist_adjacent_loads does not work properly
after r189366
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: ysrumyan@gmail.com
This regression can be seen in the attached simple test-case - cmov conversion
is not happened. The fix is evident:
--- tree-ssa-phiopt.c (revision 190151)
+++ tree-ssa-phiopt.c (working copy)
@@ -1864,7 +1864,7 @@
/* Check the mode of the arguments to be sure a conditional move
can be generated for it. */
- if (!optab_handler (cmov_optab, TYPE_MODE (TREE_TYPE (arg1))))
+ if (optab_handler (cmov_optab, TYPE_MODE (TREE_TYPE (arg1)) ==
CODE_FOR_nothing))
continue;
/* Both statements must be assignments whose RHS is a COMPONENT_REF. */
You can see this regression on any platform supporting conditional moves (I
tested it on x86).
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/54240] Routine hoist_adjacent_loads does not work properly after r189366
2012-08-13 12:26 [Bug tree-optimization/54240] New: Routine hoist_adjacent_loads does not work properly after r189366 ysrumyan at gmail dot com
@ 2012-08-13 12:39 ` rguenth at gcc dot gnu.org
2012-08-13 12:41 ` rguenth at gcc dot gnu.org
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-08-13 12:39 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54240
--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-08-13 12:39:10 UTC ---
*** Bug 54241 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/54240] Routine hoist_adjacent_loads does not work properly after r189366
2012-08-13 12:26 [Bug tree-optimization/54240] New: Routine hoist_adjacent_loads does not work properly after r189366 ysrumyan at gmail dot com
2012-08-13 12:39 ` [Bug tree-optimization/54240] " rguenth at gcc dot gnu.org
@ 2012-08-13 12:41 ` rguenth at gcc dot gnu.org
2012-08-13 14:15 ` michael.v.zolotukhin at gmail dot com
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-08-13 12:41 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54240
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |wschmidt at gcc dot gnu.org
--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-08-13 12:41:10 UTC ---
Confirmed. William? Why don't we see any failed testcases?
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/54240] Routine hoist_adjacent_loads does not work properly after r189366
2012-08-13 12:26 [Bug tree-optimization/54240] New: Routine hoist_adjacent_loads does not work properly after r189366 ysrumyan at gmail dot com
2012-08-13 12:39 ` [Bug tree-optimization/54240] " rguenth at gcc dot gnu.org
2012-08-13 12:41 ` rguenth at gcc dot gnu.org
@ 2012-08-13 14:15 ` michael.v.zolotukhin at gmail dot com
2012-08-13 14:15 ` wschmidt at gcc dot gnu.org
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: michael.v.zolotukhin at gmail dot com @ 2012-08-13 14:15 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54240
--- Comment #3 from William J. Schmidt <wschmidt at gcc dot gnu.org> 2012-08-13 14:14:59 UTC ---
Odd, I don't know. I'll have to go back and look at the tests when I get a
moment and investigate that. Peculiar.
--- Comment #4 from Michael Zolotukhin <michael.v.zolotukhin at gmail dot com> 2012-08-13 14:15:08 UTC ---
Created attachment 28006
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28006
test-case confirming the issue
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/54240] Routine hoist_adjacent_loads does not work properly after r189366
2012-08-13 12:26 [Bug tree-optimization/54240] New: Routine hoist_adjacent_loads does not work properly after r189366 ysrumyan at gmail dot com
` (2 preceding siblings ...)
2012-08-13 14:15 ` michael.v.zolotukhin at gmail dot com
@ 2012-08-13 14:15 ` wschmidt at gcc dot gnu.org
2012-08-13 14:25 ` wschmidt at gcc dot gnu.org
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2012-08-13 14:15 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54240
--- Comment #3 from William J. Schmidt <wschmidt at gcc dot gnu.org> 2012-08-13 14:14:59 UTC ---
Odd, I don't know. I'll have to go back and look at the tests when I get a
moment and investigate that. Peculiar.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/54240] Routine hoist_adjacent_loads does not work properly after r189366
2012-08-13 12:26 [Bug tree-optimization/54240] New: Routine hoist_adjacent_loads does not work properly after r189366 ysrumyan at gmail dot com
` (3 preceding siblings ...)
2012-08-13 14:15 ` wschmidt at gcc dot gnu.org
@ 2012-08-13 14:25 ` wschmidt at gcc dot gnu.org
2012-08-13 15:46 ` wschmidt at gcc dot gnu.org
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2012-08-13 14:25 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54240
--- Comment #5 from William J. Schmidt <wschmidt at gcc dot gnu.org> 2012-08-13 14:24:48 UTC ---
Well, I'm embarrassed. The tests I wrote for this functionality never got into
the test suite -- I apparently forgot to submit them with the patch -- and I
can't find them anymore. I'll write some new ones soon. Apologies for the
oversight. :(
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/54240] Routine hoist_adjacent_loads does not work properly after r189366
2012-08-13 12:26 [Bug tree-optimization/54240] New: Routine hoist_adjacent_loads does not work properly after r189366 ysrumyan at gmail dot com
` (4 preceding siblings ...)
2012-08-13 14:25 ` wschmidt at gcc dot gnu.org
@ 2012-08-13 15:46 ` wschmidt at gcc dot gnu.org
2012-08-13 20:40 ` wschmidt at gcc dot gnu.org
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2012-08-13 15:46 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54240
William J. Schmidt <wschmidt at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2012-08-13
AssignedTo|unassigned at gcc dot |wschmidt at gcc dot gnu.org
|gnu.org |
Ever Confirmed|0 |1
--- Comment #6 from William J. Schmidt <wschmidt at gcc dot gnu.org> 2012-08-13 15:46:31 UTC ---
Mine.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/54240] Routine hoist_adjacent_loads does not work properly after r189366
2012-08-13 12:26 [Bug tree-optimization/54240] New: Routine hoist_adjacent_loads does not work properly after r189366 ysrumyan at gmail dot com
` (5 preceding siblings ...)
2012-08-13 15:46 ` wschmidt at gcc dot gnu.org
@ 2012-08-13 20:40 ` wschmidt at gcc dot gnu.org
2012-08-13 21:59 ` pinskia at gcc dot gnu.org
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2012-08-13 20:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54240
--- Comment #7 from William J. Schmidt <wschmidt at gcc dot gnu.org> 2012-08-13 20:39:59 UTC ---
Something else is broken, too, as the optab handlers for cmov on powerpc64
appear to have gone missing. I'll get one of our back-end specialists to help
me understand that.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/54240] Routine hoist_adjacent_loads does not work properly after r189366
2012-08-13 12:26 [Bug tree-optimization/54240] New: Routine hoist_adjacent_loads does not work properly after r189366 ysrumyan at gmail dot com
` (6 preceding siblings ...)
2012-08-13 20:40 ` wschmidt at gcc dot gnu.org
@ 2012-08-13 21:59 ` pinskia at gcc dot gnu.org
2012-08-14 11:44 ` wschmidt at gcc dot gnu.org
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-08-13 21:59 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54240
--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-08-13 21:59:33 UTC ---
(In reply to comment #7)
> Something else is broken, too, as the optab handlers for cmov on powerpc64
> appear to have gone missing. I'll get one of our back-end specialists to help
> me understand that.
They are only enabled for TARGET_ISEL<sel> which is either TARGET_ISEL or
TARGET_ISEL64 which is correct as ppc64 does not have isel by default.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/54240] Routine hoist_adjacent_loads does not work properly after r189366
2012-08-13 12:26 [Bug tree-optimization/54240] New: Routine hoist_adjacent_loads does not work properly after r189366 ysrumyan at gmail dot com
` (7 preceding siblings ...)
2012-08-13 21:59 ` pinskia at gcc dot gnu.org
@ 2012-08-14 11:44 ` wschmidt at gcc dot gnu.org
2012-08-14 11:47 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2012-08-14 11:44 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54240
--- Comment #9 from William J. Schmidt <wschmidt at gcc dot gnu.org> 2012-08-14 11:44:35 UTC ---
(In reply to comment #8)
> (In reply to comment #7)
> > Something else is broken, too, as the optab handlers for cmov on powerpc64
> > appear to have gone missing. I'll get one of our back-end specialists to help
> > me understand that.
>
> They are only enabled for TARGET_ISEL<sel> which is either TARGET_ISEL or
> TARGET_ISEL64 which is correct as ppc64 does not have isel by default.
Right. But the problem is the optab entries are no longer being built at all
when configured correctly. Something seems to have changed recently to break
this.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/54240] Routine hoist_adjacent_loads does not work properly after r189366
2012-08-13 12:26 [Bug tree-optimization/54240] New: Routine hoist_adjacent_loads does not work properly after r189366 ysrumyan at gmail dot com
` (8 preceding siblings ...)
2012-08-14 11:44 ` wschmidt at gcc dot gnu.org
@ 2012-08-14 11:47 ` rguenth at gcc dot gnu.org
2012-08-14 19:48 ` wschmidt at gcc dot gnu.org
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-08-14 11:47 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54240
--- Comment #10 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-08-14 11:47:01 UTC ---
(In reply to comment #9)
> (In reply to comment #8)
> > (In reply to comment #7)
> > > Something else is broken, too, as the optab handlers for cmov on powerpc64
> > > appear to have gone missing. I'll get one of our back-end specialists to help
> > > me understand that.
> >
> > They are only enabled for TARGET_ISEL<sel> which is either TARGET_ISEL or
> > TARGET_ISEL64 which is correct as ppc64 does not have isel by default.
>
> Right. But the problem is the optab entries are no longer being built at all
> when configured correctly. Something seems to have changed recently to break
> this.
Richard changed optabs to a sparse representation IIRC.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/54240] Routine hoist_adjacent_loads does not work properly after r189366
2012-08-13 12:26 [Bug tree-optimization/54240] New: Routine hoist_adjacent_loads does not work properly after r189366 ysrumyan at gmail dot com
` (9 preceding siblings ...)
2012-08-14 11:47 ` rguenth at gcc dot gnu.org
@ 2012-08-14 19:48 ` wschmidt at gcc dot gnu.org
2012-08-15 13:18 ` wschmidt at gcc dot gnu.org
2012-08-15 13:21 ` wschmidt at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2012-08-14 19:48 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54240
--- Comment #11 from William J. Schmidt <wschmidt at gcc dot gnu.org> 2012-08-14 19:48:40 UTC ---
Well. It turns out that cmov_optab was a red herring. Apparently no ports are
generating this, and actually movcc_optab is what's being used instead. My
guess is that cmov_optab should probably be removed as unused. Thanks to Mike
for helping me sort that out. Patch (with testcase) coming soon.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/54240] Routine hoist_adjacent_loads does not work properly after r189366
2012-08-13 12:26 [Bug tree-optimization/54240] New: Routine hoist_adjacent_loads does not work properly after r189366 ysrumyan at gmail dot com
` (10 preceding siblings ...)
2012-08-14 19:48 ` wschmidt at gcc dot gnu.org
@ 2012-08-15 13:18 ` wschmidt at gcc dot gnu.org
2012-08-15 13:21 ` wschmidt at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2012-08-15 13:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54240
--- Comment #12 from William J. Schmidt <wschmidt at gcc dot gnu.org> 2012-08-15 13:17:47 UTC ---
Author: wschmidt
Date: Wed Aug 15 13:17:42 2012
New Revision: 190411
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190411
Log:
gcc:
2012-08-15 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR tree-optimization/54240
* tree-ssa-phiopt.c (hoist_adjacent_loads): Correct test for
existence of conditional move with given mode.
gcc/testsuite:
2012-08-15 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR tree-optimization/54240
* gcc.target/powerpc/pr54240.c: New test.
* gcc.target/mips/pr54240.c: Likewise.
Added:
trunk/gcc/testsuite/gcc.target/mips/pr54240.c
trunk/gcc/testsuite/gcc.target/powerpc/pr54240.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-phiopt.c
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/54240] Routine hoist_adjacent_loads does not work properly after r189366
2012-08-13 12:26 [Bug tree-optimization/54240] New: Routine hoist_adjacent_loads does not work properly after r189366 ysrumyan at gmail dot com
` (11 preceding siblings ...)
2012-08-15 13:18 ` wschmidt at gcc dot gnu.org
@ 2012-08-15 13:21 ` wschmidt at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2012-08-15 13:21 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54240
William J. Schmidt <wschmidt at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.8.0
--- Comment #13 from William J. Schmidt <wschmidt at gcc dot gnu.org> 2012-08-15 13:20:58 UTC ---
Fixed. Yuri or Michael, if you would like to add a version of the pr54240.c
test case for Intel targets, that would be a bonus. I don't know how to set
the compile flags for subtargets with conditional moves on that architecture.
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2012-08-15 13:21 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-13 12:26 [Bug tree-optimization/54240] New: Routine hoist_adjacent_loads does not work properly after r189366 ysrumyan at gmail dot com
2012-08-13 12:39 ` [Bug tree-optimization/54240] " rguenth at gcc dot gnu.org
2012-08-13 12:41 ` rguenth at gcc dot gnu.org
2012-08-13 14:15 ` michael.v.zolotukhin at gmail dot com
2012-08-13 14:15 ` wschmidt at gcc dot gnu.org
2012-08-13 14:25 ` wschmidt at gcc dot gnu.org
2012-08-13 15:46 ` wschmidt at gcc dot gnu.org
2012-08-13 20:40 ` wschmidt at gcc dot gnu.org
2012-08-13 21:59 ` pinskia at gcc dot gnu.org
2012-08-14 11:44 ` wschmidt at gcc dot gnu.org
2012-08-14 11:47 ` rguenth at gcc dot gnu.org
2012-08-14 19:48 ` wschmidt at gcc dot gnu.org
2012-08-15 13:18 ` wschmidt at gcc dot gnu.org
2012-08-15 13:21 ` wschmidt 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).