Simplify (subreg:SI (ashiftrt:DI a 32) 4)
Joern Rennecke
joern.rennecke@superh.com
Wed Aug 6 20:10:00 GMT 2003
> This patch simplifies (subreg:SI (ashiftrt:DI a 32) 4) into (subreg:SI
> a 0) which should help SPEC (mostly crafty).
But this is only valid for big endian.
> On PPC before the patch, gcc produces:
> _foo:
> srawi r9,r3,31
> srawi r10,r3,0
> mr r3,r10
> blr
> but after:
> _foo:
> blr
I wonder how you did this, since the numbers you test for are wrong, too.
> ChangeLog:
> * simplify-rtx.c (simplify_subreg): Simplify (subreg:M1 (ashiftrt:M2 a
> n) m)
> into (subreg:M1 a 0) where n is 2<<m and and m is unit size of m1.
n should be m * BITS_PER_UNIT.
2<<m in your example is 16. Besides, why do you use the unit size?
consider:
(subreg:V2HI (ashiftrt:DI a 32) 4)
More information about the Gcc-patches
mailing list