Don't enable -fprefetch-loop-arrays for TARGET_SOFTWARE_PREFETCHING_BENEFICIAL if...
commit525643d84b467f2e6d927a7f5f46a7e32a60b1a9
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 12 Apr 2015 21:35:17 +0000 (12 21:35 +0000)
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 12 Apr 2015 21:35:17 +0000 (12 21:35 +0000)
treed964237bd48a94f7abee58d8677ad06072245215
parentec17f8267534164fb15b6044528a628b6bbfc3e2
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222033 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/config/i386/i386.c