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

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).