From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13264 invoked by alias); 27 Aug 2013 09:33:52 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 13228 invoked by uid 48); 27 Aug 2013 09:33:50 -0000 From: "markus at trippelsdorf dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug gcov-profile/58250] New: -fprofile-use causes: "warning: -fprefetch-loop-arrays is not supported with -Os" Date: Tue, 27 Aug 2013 09:33:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: gcov-profile X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: markus at trippelsdorf dot de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-08/txt/msg01378.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58250 Bug ID: 58250 Summary: -fprofile-use causes: "warning: -fprefetch-loop-arrays is not supported with -Os" Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: gcov-profile Assignee: unassigned at gcc dot gnu.org Reporter: markus at trippelsdorf dot de Just noticed this issue during a PGO/LTO Firefox build. During the -fprofile-use phase I always get the following warning: warning: -fprefetch-loop-arrays is not supported with -Os [enabled by default] This is caused by rev.193135: /* Enable sw prefetching at -O3 for CPUS that prefetching is helpful. */ if (flag_prefetch_loop_arrays < 0 && HAVE_prefetch - && optimize >= 3 + && (optimize >= 3 || flag_profile_use) && TARGET_SOFTWARE_PREFETCHING_BENEFICIAL) flag_prefetch_loop_arrays = 1; Does the following patch look OK? diff --git a/gcc/toplev.c b/gcc/toplev.c index 53f53fd..9955ed4 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -1506,7 +1506,7 @@ process_options (void) /* This combination of options isn't handled for i386 targets and doesn't make much sense anyway, so don't allow it. */ - if (flag_prefetch_loop_arrays > 0 && optimize_size) + if (flag_prefetch_loop_arrays > 0 && optimize_size && !flag_profile_use) { warning (0, "-fprefetch-loop-arrays is not supported with -Os"); flag_prefetch_loop_arrays = 0;