[Bug target/60431] [PATCH] [TIC6X] target description missing abssi2 insn
wojtek.golf at interia dot pl
gcc-bugzilla@gcc.gnu.org
Wed Mar 5 21:53:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60431
--- Comment #5 from Wojciech Migda <wojtek.golf at interia dot pl> ---
So, I'd like to learn some more from this. Suppose I have code like this:
int fn_i1(int x)
{
x /= 2;
return (x >= 0) ? x : -x;
}
or
short fn_s1(short x)
{
return (x >= 0) ? x : -x;
}
In each case the compiler should know that the range of values being subjected
to *abs is such that it won't matter whether it will use the sign saturated
instruction or not. But it doesn't take advantage of that. Or I am still
getting it wrong?
More information about the Gcc-bugs
mailing list