From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7721 invoked by alias); 12 Jul 2011 15:22:51 -0000 Received: (qmail 7713 invoked by uid 22791); 12 Jul 2011 15:22:50 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_VZ,TW_ZB 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; Tue, 12 Jul 2011 15:22:37 +0000 From: "rguenther at suse dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/49715] Could do more efficient unsigned-to-float to conversions based on range information X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenther at suse dot de X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: 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 Date: Tue, 12 Jul 2011 15:22:00 -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 X-SW-Source: 2011-07/txt/msg00922.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49715 --- Comment #4 from rguenther at suse dot de 2011-07-12 15:21:51 UTC --- On Tue, 12 Jul 2011, sgunderson at bigfoot dot com wrote: > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49715 > > --- Comment #3 from sgunderson at bigfoot dot com 2011-07-12 15:19:51 UTC --- > Wow, answer in record time :-) > > I don't know anything about GCC internals, so I can't comment much on the > patch; my only worry here is what would happen if you had a very narrow mask, > e.g. (x & 0xf) and you try to coerce it into the minimum possible type (a > char); wouldn't you end up doing some sort of expansion with movzbl again? That's why I limit it to SImode truncation (that should be equivalent to an int). Quite lame ;)