diff options
author | Joseph Myers <joseph@codesourcery.com> | 2015-04-12 22:35:17 +0100 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2015-04-12 22:35:17 +0100 |
commit | 0b4a769ec91b21d7d5237d3ba60d02c90304dc33 (patch) | |
tree | d964237bd48a94f7abee58d8677ad06072245215 /gcc | |
parent | e183a9d567a9a41af5077393b43a9d9a08c71879 (diff) | |
download | gcc-0b4a769ec91b21d7d5237d3ba60d02c90304dc33.zip gcc-0b4a769ec91b21d7d5237d3ba60d02c90304dc33.tar.gz gcc-0b4a769ec91b21d7d5237d3ba60d02c90304dc33.tar.bz2 |
Don't enable -fprefetch-loop-arrays for TARGET_SOFTWARE_PREFETCHING_BENEFICIAL if -Os.
Testing an x86_64 toolchain configured for a processor with
TARGET_SOFTWARE_PREFETCHING_BENEFICIAL produces failures
FAIL: g++.dg/pr60518.C -std=gnu++98 (test for excess errors)
FAIL: g++.dg/pr60518.C -std=gnu++11 (test for excess errors)
FAIL: g++.dg/pr60518.C -std=gnu++14 (test for excess errors)
where the failure is from the message "pr60518.C:1:0: warning:
-fprefetch-loop-arrays is not supported with -Os".
Given that lack of support, it seems appropriate for the back end not
to enable this option in the -Os case; this patch implements that.
Bootstrapped with no regressions on x86_64-unknown-linux-gnu; tested
for a cross to x86_64-linux-gnu --with-arch=btver2, where those test
failures duly disappear.
* config/i386/i386.c (ix86_option_override_internal): Don't set
-fprefetch-loop-arrays if optimizing for size.
From-SVN: r222033
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5e1b617..dfd76ab 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-04-12 Joseph Myers <joseph@codesourcery.com> + + * config/i386/i386.c (ix86_option_override_internal): Don't set + -fprefetch-loop-arrays if optimizing for size. + 2015-04-12 Jan Hubicka <hubicka@ucw.cz> Gerald Pfeifer <gerald@pfeifer.com> diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 110ec4a..b442da9 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -4168,6 +4168,7 @@ ix86_option_override_internal (bool main_args_p, if (opts->x_flag_prefetch_loop_arrays < 0 && HAVE_prefetch && (opts->x_optimize >= 3 || opts->x_flag_profile_use) + && !opts->x_optimize_size && TARGET_SOFTWARE_PREFETCHING_BENEFICIAL) opts->x_flag_prefetch_loop_arrays = 1; |