From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22088 invoked by alias); 12 Sep 2014 10:58:29 -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 22033 invoked by uid 55); 12 Sep 2014 10:58:25 -0000 From: "ro at CeBiTec dot Uni-Bielefeld.DE" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/62631] gcc.dg/tree-ssa/ivopts-lt-2.c FAILs Date: Fri, 12 Sep 2014 10:58:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed 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: ro at CeBiTec dot Uni-Bielefeld.DE 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: 2014-09/txt/msg01494.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62631 --- Comment #9 from ro at CeBiTec dot Uni-Bielefeld.DE --- > --- Comment #8 from Eric Botcazou --- >> I think that's easiest for Eric to say. > > Not really, I guess you want to debug the function and replay the computation > since the cost is synthetized and doesn't come directly from the back-end. I've found what's going on: * In expmed.c (init_expmed_one_mode), l.194 set_shiftadd_cost (speed, mode, m, set_src_cost (all->shift_add, speed)); with all->shift_add something like (plus:QI (mult:QI (reg:QI 109 [0]) (const_int 8 [0x8])) (reg:QI 109 [0])) * For the mult part, rtx_code calls sparc_rtx_cost, which has case MULT: if (float_mode_p) *total = sparc_costs->float_mul; else if (! TARGET_HARD_MUL) *total = COSTS_N_INSNS (25); On SPARCv9/-m64, TARGET_HARD_MUL is false, so we get the 25*4 = 100 part, unlike v8, which explains why the test only fails for 64-bit. Rainer