--- Comment #8 from pinskia at gcc dot gnu dot org 2010-07-21 22:51 ---
For some reason rs6000 has an abssi pattern but it is not produced by ce1.
--
pinskia at gcc dot gnu dot org changed:
What|Removed |Added
--
--- Comment #7 from avr at gjlay dot de 2010-06-21 12:27 ---
(In reply to comment #5)
> It is folding from the frontend that changes
>
> if (y >= 0x8000)
>
> to
>
> if ((int) y < 0)
>
> (see code == LT instead of code == GEU)
>
> But the main issue is that y = -y to abs
--- Comment #6 from rguenth at gcc dot gnu dot org 2010-06-21 11:50 ---
int __attribute__((noinline))
abssat2 (int x)
{
unsigned int y = x;
if (x < 0)
y = -y;
if (y >= 0x8000)
y--;
return y;
}
extern void abort (void);
int main()
{
if (abssat2 (0x8000) != 0x7fff
--- Comment #5 from rguenth at gcc dot gnu dot org 2010-06-21 11:38 ---
It is folding from the frontend that changes
if (y >= 0x8000)
to
if ((int) y < 0)
(see code == LT instead of code == GEU)
But the main issue is that y = -y to abs is bogus (but we can't easily tell
t
--- Comment #4 from avr at gjlay dot de 2010-06-21 11:30 ---
Created an attachment (id=20958)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20958&action=view)
Dump for .c.159r.combine
Dump for .c.159r.combine
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44608
--- Comment #3 from avr at gjlay dot de 2010-06-21 11:28 ---
Created an attachment (id=20957)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20957&action=view)
Dump for .c.141r.ce1
Dump for .c.141r.ce1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44608
--- Comment #2 from avr at gjlay dot de 2010-06-21 11:28 ---
Created an attachment (id=20956)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20956&action=view)
Dump for .c.128r.expand
Dump for .c.128r.expand
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44608
--- Comment #1 from avr at gjlay dot de 2010-06-21 11:26 ---
Created an attachment (id=20955)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20955&action=view)
Dump for .c.123t.optimized
Dump for .c.123t.optimized
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44608