From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25694 invoked by alias); 29 Aug 2011 13:52:12 -0000 Received: (qmail 25666 invoked by uid 22791); 29 Aug 2011 13:52:10 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 29 Aug 2011 13:51:56 +0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/50176] [4.7 Regression] 4.7 generates spill-fill dealing with char->int conversion Date: Mon, 29 Aug 2011 14:12: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-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth 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: 4.7.0 X-Bugzilla-Changed-Fields: Keywords Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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 X-SW-Source: 2011-08/txt/msg02305.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50176 Richard Guenther changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |missed-optimization --- Comment #6 from Richard Guenther 2011-08-29 13:50:56 UTC --- It performs perfectly sensible optimizations: @@ -91,11 +83,9 @@ y_33 = (int) D.2055_32; D.2056_34 = inptr1_19 + col_5; D.2057_35 = *D.2056_34; - cb_36 = (int) D.2057_35; D.2058_37 = inptr2_24 + col_5; D.2059_38 = *D.2058_37; - cr_39 = (int) D.2059_38; - cr.0_40 = (unsigned int) cr_39; + cr.0_40 = (unsigned int) D.2059_38; ... @@ -104,12 +94,11 @@ D.2066_48 = range_limit_47(D) + D.2065_46; D.2067_49 = *D.2066_48; *outptr_4 = D.2067_49; - D.2068_50 = outptr_4 + 1; - cb.1_51 = (unsigned int) cb_36; + cb.1_51 = (unsigned int) D.2057_35; D.2070_52 = cb.1_51 * 4; D.2071_54 = Cbgtab_53(D) + D.2070_52; D.2072_55 = *D.2071_54; - cr.0_56 = (unsigned int) cr_39; + cr.0_56 = (unsigned int) D.2059_38; D.2061_57 = cr.0_56 * 4; D.2073_59 = Crgtab_58(D) + D.2061_57; D.2074_60 = *D.2073_59; This seems to be at most a register allocation or target issue. What it does is change (unsinged)(int)*load to (unsigned)*load, eventually enlarging life-ranges (didn't double-check that).