https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117821
Daniel Henrique Barboza <daniel.barboza at oss dot qualcomm.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |daniel.barboza at oss dot
qualcomm
| |.com
--- Comment #2 from Daniel Henrique Barboza <daniel.barboza at oss dot
qualcomm.com> ---
This one is close to 126523 which I have a patch in the ML already so I'll take
a look.
I am assuming that by "the ~ should prop over the truncation" you mean
transforming f2 into f1, i.e. truncate first then do the neg.
It also seems that we can do that not just for bit_ior but also for bit_and and
bit_xor, as long as we guarantee that the immediate has an adequate length for
the trunc operation, e.g. for:
unsigned char f3 (unsigned int a)
{
a = a (bit_ior|bit_and|bit_xor) 0xFF00FFEE;
unsigned char t = a;
return t;
}
This can be turned into:
unsigned char f3 (unsigned int a)
{
unsigned char t = a;
t = t (bit_ior|bit_and|bit_xor) 0xEE;
return t;
}