From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3655 invoked by alias); 19 Oct 2004 21:31:38 -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 3645 invoked by alias); 19 Oct 2004 21:31:37 -0000 Date: Tue, 19 Oct 2004 21:31:00 -0000 Message-ID: <20041019213137.3644.qmail@sourceware.org> From: "schlie at comcast dot net" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20041019202143.18065.schlie@comcast.net> References: <20041019202143.18065.schlie@comcast.net> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug target/18065] wrong built-in functions selected X-Bugzilla-Reason: CC X-SW-Source: 2004-10/txt/msg02557.txt.bz2 List-Id: ------- Additional Comments From schlie at comcast dot net 2004-10-19 21:31 ------- Subject: Re: wrong built-in functions selected As of course otherwise then, what's the purpose of s/u 8-bit / and % built-in functions, if not to enable their use when all the operands are type compatible, minimally explicitly and ideally when type compatible? -paul- > From: schlie at comcast dot net > Reply-To: > Date: 19 Oct 2004 21:18:17 -0000 > To: > Subject: [Bug target/18065] wrong built-in functions selected > > > ------- Additional Comments From schlie at comcast dot net 2004-10-19 21:18 > ------- > Subject: Re: wrong built-in functions selected > > Nope, please look at the coded examples: > > - they demonstrate that: > > (signed char) % (signed char) => invokes (int) % (int), not correct. > > - and the compiler consistently treats rhs immediate value differently > than lhs immediate values for some non-descript reason? (arguably, > it should assume all immediate values are ints unless cast/specified > otherwise, but that's not what it does, nor does it properly treat > lhs operands as signed chars even if properly explicitly cast. > > Thanks, -paul- > >> From: pinskia at gcc dot gnu dot org >> Reply-To: >> Date: 19 Oct 2004 20:39:44 -0000 >> To: >> Subject: [Bug target/18065] wrong built-in functions selected >> >> >> ------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-19 >> 20:39 ------- >> char ss = s % s ; //<__divmodhi4> wrong, should be 8-bit <__divmodqi4> >> This is not wrong as we sign extend the arguments as required by the C >> standard (to int). >> >> So this is just an missed-optimization. >> >> -- >> What |Removed |Added >> ---------------------------------------------------------------------------- >> Severity|critical |minor >> Component|c |target >> Keywords| |missed-optimization >> >> >> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18065 >> >> ------- You are receiving this mail because: ------- >> You reported the bug, or are watching the reporter. > > > > > -- > > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18065 > > ------- You are receiving this mail because: ------- > You reported the bug, or are watching the reporter. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18065