From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27167 invoked by alias); 16 Aug 2005 21:11:15 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 26620 invoked by alias); 16 Aug 2005 21:10:57 -0000 Date: Tue, 16 Aug 2005 21:20:00 -0000 Message-ID: <20050816211057.26619.qmail@sourceware.org> From: "pinskia at physics dot uc dot edu" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20050816205130.23429.tkoenig@gcc.gnu.org> References: <20050816205130.23429.tkoenig@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug tree-optimization/23429] Operations involving unsigneds could be simplified X-Bugzilla-Reason: CC X-SW-Source: 2005-08/txt/msg01864.txt.bz2 List-Id: ------- Additional Comments From pinskia at physics dot uc dot edu 2005-08-16 21:10 ------- Subject: Re: New: Operations involving unsigneds could be simplified > > This could just return 1. > > $ cat unsigned-arith.c > int foo(unsigned int *a, unsigned int *b, unsigned int *c) > { > unsigned int s1, s2; > > s1 = *a + *b; > s2 = *c + *b; > > return s1 + *c == s2 + *a; > } The issue here is the reassociater needs to be a fully reassociater and that has a couple of different bugs about this filed already. -- Pinski -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23429