From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23769 invoked by alias); 4 Sep 2014 14:28:32 -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 23734 invoked by uid 48); 4 Sep 2014 14:28:27 -0000 From: "amodra at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/63169] New: ivopts rewrite_uses pessimizes debug info Date: Thu, 04 Sep 2014 14:28:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: amodra at gmail dot com 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: 2014-09/txt/msg01053.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63169 Bug ID: 63169 Summary: ivopts rewrite_uses pessimizes debug info Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: amodra at gmail dot com Extract from 122t.ivopts for gcc.c-torture/compile/pr60655-2.c on powerpc, showing loop in mp_compare. The thing to note is the good expression for # DEBUG r1, a simple dependency on one iv, but the bad choice for # DEBUG r2 (which triggers pr60655 on powerpc). # DEBUG r2 => (sizetype) (ivtmp.19_20 + 4294967295) is correct also and leads to much simpler debug info. : # ivtmp.17_24 = PHI # ivtmp.19_20 = PHI # DEBUG precision => (short int) (((unsigned short) precision_6 - (unsigned short) (unsigned int) (r1_10 + 1)) + (unsigned short) ivtmp.17_24) # DEBUG r2 => r2_12 + (((sizetype) ivtmp.17_24 - (sizetype) r1_10) + 4294967295) # DEBUG r1 => (const unit *) (ivtmp.17_24 + 4294967295) ivtmp.17_23 = ivtmp.17_24 - 1; _28 = (void *) ivtmp.17_23; _13 = MEM[base: _28, offset: 0B]; ivtmp.19_25 = ivtmp.19_20 - 1; _29 = (void *) ivtmp.19_25; _14 = MEM[base: _29, offset: 0B]; if (_13 < _14) goto ; else goto ; : # DEBUG r1 => (const unit *) (ivtmp.17_23 + 4294967295) # DEBUG r2 => r2_12 + (((sizetype) ivtmp.17_23 - (sizetype) r1_10) + 4294967295) if (_13 > _14) goto ; else goto ; : # DEBUG precision => (short int) (((unsigned short) precision_6 - (unsigned short) (unsigned int) (r1_10 + 1)) + (unsigned short) ivtmp.17_23) if (ivtmp.17_23 != _35) goto ; else goto ; : goto ;