[Bug target/63321] [SH] Unused T bit result of shll / shlr insns
olegendo at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Dec 2 09:32:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63321
--- Comment #2 from Oleg Endo <olegendo at gcc dot gnu.org> ---
(In reply to Oleg Endo from comment #1)
>
> void test2_1 (unsigned int x, unsigned int* y)
> {
> y[0] = x >> 1;
> y[1] = x & 1;
> }
>
> will compile to the desired sequence:
> shlr r4
> movt r1
> mov.l r4,@r5
> rts
> mov.l r1,@(4,r5)
Changing the order of the operations to:
void test2_1 (unsigned int x, unsigned int* y)
{
y[0] = x & 1;
y[1] = x >> 1;
}
will make it fail to combine the insns though.
More information about the Gcc-bugs
mailing list