public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c/52691] New: va_start to builtin_next_arg optimization lost @ 2012-03-23 18:16 bigotp at acm dot org 2012-03-26 8:24 ` [Bug middle-end/52691] [4.7/4.8 Regression] " rguenth at gcc dot gnu.org ` (3 more replies) 0 siblings, 4 replies; 5+ messages in thread From: bigotp at acm dot org @ 2012-03-23 18:16 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52691 Bug #: 52691 Summary: va_start to builtin_next_arg optimization lost Classification: Unclassified Product: gcc Version: tree-ssa Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned@gcc.gnu.org ReportedBy: bigotp@acm.org In the commit below, the following edit was made which inverted the sense of the test, preventing the optimization from applying when it should. A ! must be inserted before builtin_decl_explicit_p. diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c index e207e23..31c31c1 100644 --- a/gcc/tree-ssa-ccp.c +++ b/gcc/tree-ssa-ccp.c @@ -2175,7 +2175,7 @@ optimize_stdarg_builtin (gimple call) case BUILT_IN_VA_START: if (!va_list_simple_ptr || targetm.expand_builtin_va_start != NULL - || built_in_decls[BUILT_IN_NEXT_ARG] == NULL) + || builtin_decl_explicit_p (BUILT_IN_NEXT_ARG)) return NULL_TREE; if (gimple_call_num_args (call) != 2) commit b9a1687032fc1afb5f4e9d8dfa775a134abe21ba Author: meissner <meissner@138bc75d-0d04-0410-961f-82ee72b054a4> Date: Tue Oct 11 19:55:09 2011 +0000 Convert standard builtin functions from being arrays to using a functional interface git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@179820 138bc75d-0d04-0410-961f-82ee72b054a4 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug middle-end/52691] [4.7/4.8 Regression] va_start to builtin_next_arg optimization lost 2012-03-23 18:16 [Bug c/52691] New: va_start to builtin_next_arg optimization lost bigotp at acm dot org @ 2012-03-26 8:24 ` rguenth at gcc dot gnu.org 2012-03-28 14:50 ` jakub at gcc dot gnu.org ` (2 subsequent siblings) 3 siblings, 0 replies; 5+ messages in thread From: rguenth at gcc dot gnu.org @ 2012-03-26 8:24 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52691 Richard Guenther <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Version|tree-ssa |4.7.0 Last reconfirmed| |2012-03-26 Component|c |middle-end CC| |meissner at gcc dot gnu.org Ever Confirmed|0 |1 Summary|va_start to |[4.7/4.8 Regression] |builtin_next_arg |va_start to |optimization lost |builtin_next_arg | |optimization lost Target Milestone|--- |4.7.1 --- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-03-26 08:23:05 UTC --- Confirmed. Michael, can you please fix trunk and the 4.7 branch? Thx. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug middle-end/52691] [4.7/4.8 Regression] va_start to builtin_next_arg optimization lost 2012-03-23 18:16 [Bug c/52691] New: va_start to builtin_next_arg optimization lost bigotp at acm dot org 2012-03-26 8:24 ` [Bug middle-end/52691] [4.7/4.8 Regression] " rguenth at gcc dot gnu.org @ 2012-03-28 14:50 ` jakub at gcc dot gnu.org 2012-03-28 14:53 ` jakub at gcc dot gnu.org 2012-03-28 15:05 ` jakub at gcc dot gnu.org 3 siblings, 0 replies; 5+ messages in thread From: jakub at gcc dot gnu.org @ 2012-03-28 14:50 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52691 --- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-03-28 14:47:59 UTC --- Author: jakub Date: Wed Mar 28 14:47:45 2012 New Revision: 185917 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=185917 Log: PR middle-end/52691 * tree-ssa-ccp.c (optimize_stdarg_builtin): Optimize __builtin_va_start to __builtin_next_arg if the latter is builtin_decl_explicit_p rather than when it is not. * gcc.dg/pr52691.c: New test. Added: trunk/gcc/testsuite/gcc.dg/pr52691.c Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-ssa-ccp.c ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug middle-end/52691] [4.7/4.8 Regression] va_start to builtin_next_arg optimization lost 2012-03-23 18:16 [Bug c/52691] New: va_start to builtin_next_arg optimization lost bigotp at acm dot org 2012-03-26 8:24 ` [Bug middle-end/52691] [4.7/4.8 Regression] " rguenth at gcc dot gnu.org 2012-03-28 14:50 ` jakub at gcc dot gnu.org @ 2012-03-28 14:53 ` jakub at gcc dot gnu.org 2012-03-28 15:05 ` jakub at gcc dot gnu.org 3 siblings, 0 replies; 5+ messages in thread From: jakub at gcc dot gnu.org @ 2012-03-28 14:53 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52691 --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-03-28 14:49:40 UTC --- Author: jakub Date: Wed Mar 28 14:49:26 2012 New Revision: 185918 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=185918 Log: PR middle-end/52691 * tree-ssa-ccp.c (optimize_stdarg_builtin): Optimize __builtin_va_start to __builtin_next_arg if the latter is builtin_decl_explicit_p rather than when it is not. * gcc.dg/pr52691.c: New test. Added: branches/gcc-4_7-branch/gcc/testsuite/gcc.dg/pr52691.c Modified: branches/gcc-4_7-branch/gcc/ChangeLog branches/gcc-4_7-branch/gcc/testsuite/ChangeLog branches/gcc-4_7-branch/gcc/tree-ssa-ccp.c ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug middle-end/52691] [4.7/4.8 Regression] va_start to builtin_next_arg optimization lost 2012-03-23 18:16 [Bug c/52691] New: va_start to builtin_next_arg optimization lost bigotp at acm dot org ` (2 preceding siblings ...) 2012-03-28 14:53 ` jakub at gcc dot gnu.org @ 2012-03-28 15:05 ` jakub at gcc dot gnu.org 3 siblings, 0 replies; 5+ messages in thread From: jakub at gcc dot gnu.org @ 2012-03-28 15:05 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52691 Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |jakub at gcc dot gnu.org Resolution| |FIXED --- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-03-28 14:58:12 UTC --- Fixed. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-03-28 14:59 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2012-03-23 18:16 [Bug c/52691] New: va_start to builtin_next_arg optimization lost bigotp at acm dot org 2012-03-26 8:24 ` [Bug middle-end/52691] [4.7/4.8 Regression] " rguenth at gcc dot gnu.org 2012-03-28 14:50 ` jakub at gcc dot gnu.org 2012-03-28 14:53 ` jakub at gcc dot gnu.org 2012-03-28 15:05 ` jakub 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).