[Bug target/64835] -fno-ipa-cp is inconsitently supported when attributes optimize or target are used

2024-05-15 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64835

--- Comment #12 from Eric Botcazou  ---
> Eric,  gcc.dg/ipa/iinline-attr.c XPASSes on 64-bit SPARC since
> 
> commit ffabce849033e57ebaf60029822b81e981681c21
> Author: Eric Botcazou 
> Date:   Tue Nov 29 11:43:32 2022 +0100
> 
> Couple of testsuite adjustments
> 
> gcc/testsuite/
> * gcc.dg/ipa/iinline-attr.c: XFAIL on SPARC.
> 
> while the 32-bit test is XFAILed.  Should we restrict the xfail to 32-bit
> sparc then?

The reason why it has been XFAILed does not depend on the word size though.

[Bug target/64835] -fno-ipa-cp is inconsitently supported when attributes optimize or target are used

2024-05-15 Thread ro at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64835

Rainer Orth  changed:

   What|Removed |Added

 CC||ebotcazou at gcc dot gnu.org,
   ||ro at gcc dot gnu.org

--- Comment #11 from Rainer Orth  ---
Eric,  gcc.dg/ipa/iinline-attr.c XPASSes on 64-bit SPARC since

commit ffabce849033e57ebaf60029822b81e981681c21
Author: Eric Botcazou 
Date:   Tue Nov 29 11:43:32 2022 +0100

Couple of testsuite adjustments

gcc/testsuite/
* gcc.dg/ipa/iinline-attr.c: XFAIL on SPARC.

while the 32-bit test is XFAILed.  Should we restrict the xfail to 32-bit sparc
then?

[Bug target/64835] -fno-ipa-cp is inconsitently supported when attributes optimize or target are used

2018-03-14 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64835

Paul Hua  changed:

   What|Removed |Added

 CC||paul.hua.gm at gmail dot com

--- Comment #10 from Paul Hua  ---
Any updates ?

Still fails on mips64el-linux-gnu target.

[Bug target/64835] -fno-ipa-cp is inconsitently supported when attributes optimize or target are used

2015-11-18 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64835

Bill Schmidt  changed:

   What|Removed |Added

 CC||pthaugen at gcc dot gnu.org,
   ||seurer at linux dot 
vnet.ibm.com,
   ||wschmidt at gcc dot gnu.org

--- Comment #9 from Bill Schmidt  ---
Also fails on powerpc64le-linux-gnu.

[Bug target/64835] -fno-ipa-cp is inconsitently supported when attributes optimize or target are used

2015-05-15 Thread ramana at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64835
Bug 64835 depends on bug 66015, which changed state.

Bug 66015 Summary: align directives not propagated after __attribute__ 
((__optimize__ ("O2")))
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66015

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED


[Bug target/64835] -fno-ipa-cp is inconsitently supported when attributes optimize or target are used

2015-05-05 Thread sch...@linux-m68k.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64835

--- Comment #8 from Andreas Schwab  ---
Also fails on powerpc{-m32,-m64}.


[Bug target/64835] -fno-ipa-cp is inconsitently supported when attributes optimize or target are used

2015-05-04 Thread chrbr at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64835

--- Comment #7 from chrbr at gcc dot gnu.org ---

aarch64: Seems to exhibit the same problem than x86:
override_options_after_change doesn't restore the align flags. 

ia64: will check, chances that this exhibits the same latent bug.


[Bug target/64835] -fno-ipa-cp is inconsitently supported when attributes optimize or target are used

2015-05-03 Thread sch...@linux-m68k.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64835

--- Comment #6 from Andreas Schwab  ---
Also fails on ia64.

$ grep --color hooray iinline-attr.c.062i.inline
Analyzing function: hooray/0
Analyzing function body size: hooray
Inline summary for hooray/0 inlinable
hooray/0 function not considered for inlining
Inline summary for hooray/0 inlinable
  not inlinable: hiphip.constprop/4 -> hooray/0, function not declared inline
and code size would grow
Enqueueing calls in hooray/0.
  not inlinable: hooray/0 -> non_existent/3, function body not available
hooray/0 function not declared inline and code size would grow
Inline summary for hooray/0 inlinable
  Calls: hooray/0 (1.00 per call) non_existent/3 (1.00 per call)
  Called by: hiphip.constprop.0/4 (1.00 per call) hooray/0 (1.00 per call)
  References: hooray/0 (addr)
hooray/0 (hooray) @0x20a80350
  hiphip (hooray);
hooray ()
;; Function hooray (hooray, funcdef_no=0, decl_uid=1465, cgraph_uid=0,
symbol_order=0)
hooray ()
  hooray ();


[Bug target/64835] -fno-ipa-cp is inconsitently supported when attributes optimize or target are used

2015-04-30 Thread chrbr at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64835

--- Comment #5 from chrbr at gcc dot gnu.org ---
(In reply to Martin Jambor from comment #1)
> The problem is that in the testcase iinline-1.c as it is in the
> testsuite, we use -fno-ipa-cp on the command line so that the
> interprocedural phase of IPA-CP is not run so that it does not
> interfere with the interprocedural stage of inlining, which however
> uses information gathered by the function body analysis of ipa-prop
> (which is invoked by both IPA-CP and inlining).  However, when we
> inspect the function specific optimizations in ipa-prop at this stage,
> we bail out if we see -fno-ipa-cp.
> 
> So yes, there is a clear inconsistency, but at the same time, having
> the ability to switch off only the interprocedural part of IPA-CP is
> extremely convenient for testing how the inliner uses jump functions
> and other stuff gathered by ipa-prop.  I'll try to come up with some
> fix.

Hi Martin,

back to fixing this problem, after the initial set of patch I think the
function

static bool
ipa_func_spec_opts_forbid_analysis_p (struct cgraph_node *node)
{
  tree fs_opts = DECL_FUNCTION_SPECIFIC_OPTIMIZATION (node->decl);

  if (!fs_opts)
return false;
  return !opt_for_fn (node->decl, optimize) || !opt_for_fn (node->decl, 
flag_ipa_cp);
}

should always return false, and have a coherent analysis between global
optimizations and function specific optimizations, now that the ipa-inline
checks are fixed.

so testing this. seems to fix the testcase at first sight.


[Bug target/64835] -fno-ipa-cp is inconsitently supported when attributes optimize or target are used

2015-04-30 Thread chrbr at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64835

--- Comment #4 from chrbr at gcc dot gnu.org ---
yes, I thought that this test was target independent. tested on x86, arm, sh4.

I'll checking what happens with aarch64


[Bug target/64835] -fno-ipa-cp is inconsitently supported when attributes optimize or target are used

2015-04-29 Thread amker at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64835

amker at gcc dot gnu.org changed:

   What|Removed |Added

 CC||amker at gcc dot gnu.org

--- Comment #3 from amker at gcc dot gnu.org ---
Hi,
The newly added test case failed on aarch64 as below:

FAIL: gcc.dg/ipa/iinline-attr.c scan-ipa-dump inline "hooray[^\\n]*inline copy
in test"

GCC is configured with below options:

/home/.../src/gcc/configure \
  --target=aarch64-none-elf \
  --prefix=/home/.../target-aarch64-none-elf.orig \
  --with-gmp=/home/.../build-aarch64-none-elf.orig/host-tools \
  --with-mpfr=/home/.../build-aarch64-none-elf.orig/host-tools \
  --with-mpc=/home/.../build-aarch64-none-elf.orig/host-tools \
  --with-cloog=/home/.../build-aarch64-none-elf.orig/host-tools \
  --with-isl=/home/.../build-aarch64-none-elf.orig/host-tools \
  --with-pkgversion=unknown \
  --disable-shared --disable-nls \
  --disable-threads --disable-tls \
  --enable-checking=yes \
  --enable-languages=c,c++ --with-newlib


[Bug target/64835] -fno-ipa-cp is inconsitently supported when attributes optimize or target are used

2015-04-28 Thread chrbr at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64835

--- Comment #2 from chrbr at gcc dot gnu.org ---
Author: chrbr
Date: Wed Apr 29 06:52:23 2015
New Revision: 222559

URL: https://gcc.gnu.org/viewcvs?rev=222559&root=gcc&view=rev
Log:
2015-04-29  Christian Bruel  

PR target/64835
* config/i386/i386.c (ix86_default_align): New function.
(ix86_override_options_after_change): Call ix86_default_align.
(TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): New hook.
(ix86_override_options_after_change): New function.


Added:
trunk/gcc/testsuite/gcc.dg/ipa/iinline-attr.c
trunk/gcc/testsuite/gcc.target/i386/iinline-attr-2.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/i386.c
trunk/gcc/testsuite/ChangeLog


[Bug target/64835] -fno-ipa-cp is inconsitently supported when attributes optimize or target are used

2015-02-11 Thread jamborm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64835

Martin Jambor  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2015-02-11
 CC||jamborm at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |jamborm at gcc dot 
gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Martin Jambor  ---
The problem is that in the testcase iinline-1.c as it is in the
testsuite, we use -fno-ipa-cp on the command line so that the
interprocedural phase of IPA-CP is not run so that it does not
interfere with the interprocedural stage of inlining, which however
uses information gathered by the function body analysis of ipa-prop
(which is invoked by both IPA-CP and inlining).  However, when we
inspect the function specific optimizations in ipa-prop at this stage,
we bail out if we see -fno-ipa-cp.

So yes, there is a clear inconsistency, but at the same time, having
the ability to switch off only the interprocedural part of IPA-CP is
extremely convenient for testing how the inliner uses jump functions
and other stuff gathered by ipa-prop.  I'll try to come up with some
fix.