From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22820 invoked by alias); 8 Feb 2015 14:07:27 -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 22771 invoked by uid 48); 8 Feb 2015 14:07:23 -0000 From: "amker at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/62631] gcc.dg/tree-ssa/ivopts-lt-2.c FAILs Date: Sun, 08 Feb 2015 14:07:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: amker at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 5.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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: 2015-02/txt/msg00692.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62631 --- Comment #28 from amker at gcc dot gnu.org --- On hppa 32, the two iv uses are: use 0 address in statement *p_1 = 0; at position *p_1 type int * base p_7 step 4 base object (void *) p_7 related candidates use 1 compare in statement if (i_11 <= 99) at position type unsigned int base i_4(D) + 1 step 1 is a biv related candidates And the BIV/GIV candidates are: candidate 3 (important) original biv type int * base p_7 step 4 base object (void *) p_7 candidate 4 (important) ... candidate 5 (important) original biv type unsigned int base i_4(D) step 1 The costs table are: Candidate costs: cand cost 0 5 1 5 2 5 3 4 4 5 5 4 6 5 7 5 Use 0: cand cost compl. depends on 0 1 2 1 1 1 0 2 1 1 1 3 1 0 4 3 2 inv_expr:0 5 3 2 inv_expr:0 6 1 1 7 19 3 inv_expr:1 Use 1: cand cost compl. depends on 0 4 0 inv_expr:2 3 3 0 inv_expr:3 4 0 0 5 0 0 7 4 1 It seems cand3 and cand5 have same level cost, but GCC chooses candidate 5 as below: Initial set of candidates: cost: 9 (complexity 2) cand_cost: 4 cand_use_cost: 3 (complexity 2) candidates: 5 use:0 --> iv_cand:5, cost=(3,2) use:1 --> iv_cand:5, cost=(0,0) While on other targets, cand 3 is selected.