From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9130 invoked by alias); 14 Aug 2013 20:24:18 -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 9111 invoked by uid 48); 14 Aug 2013 20:24:16 -0000 From: "meissner at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/58160] New: Power8 fusion support has a bug that shows up in running spec 2006 Date: Wed, 14 Aug 2013 20:24:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: meissner at gcc dot gnu.org 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/msg00777.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58160 Bug ID: 58160 Summary: Power8 fusion support has a bug that shows up in running spec 2006 Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: meissner at gcc dot gnu.org In running the spec 2006 testsuite with several options, we discovered that -mtune=power8 (which turns on the -mpower8-fusion option) has a segmentation fault in two benchmarks: 403.gcc when built with -O2 -mcpu=power7 -mtune=power8 -m32 435.gromacs when built with -O3 -funroll-loops -mcpu=power7 -mtune=power8 -m32 In the gcc case, I tracked it down to the fusion op in the function strength_reduce in the file loop.c. It was wanting to use the result of the addis instruction after the loop. It wanted to optimize: lis 10,loop_dump_stream@ha lwz 6,loop_dump_stream@l(6) stw 10,24(1) to: lis 6,loop_dump_stream@ha lwz 6,loop_dump_stream@l(6) stw 10,24(1) The problem is fusion was implemented using define_peephole, and the register live notes are not correct when peepholes are done.