On Tue, Jan 29, 2019 at 02:51:30PM -0800, Andrew Pinski wrote: > On Tue, Jan 29, 2019 at 2:36 PM Steve Ellcey <sell...@marvell.com> wrote: > > So the various tests that started failing with r265398 seem to need > > different fixes. This particular fix is for the > > gcc.target/aarch64/lsl_asr_sbfiz.c failure. The problem is that the > > instructions we are trying to match to *ashiftsi_extv_bfiz now have > > explicit subregs in them where they didn't before. The new version > > is: > > > > (set (reg:SI 93) > > (ashift:SI (subreg:SI (sign_extract:DI (subreg:DI (reg:SI 95) 0) > > (const_int 3 [0x3]) > > (const_int 0 [0])) 0) > > (const_int 19 [0x13]))) > > > > > > The subreg's were not there before. My proposed fix is to add an new > > instruction like *ashiftsi_extv_bfiz but with the subregs. This fixes > > lsl_asr_sbfiz.c. Does this seem like the right way to fix this? > > Seems to me rather this should have been simplified to just: > (set (reg:SI 93) > (ashift:SI (sign_extract:SI (reg:SI 95) > (const_int 3 [0x3]) > (const_int 0 [0])) > (const_int 19 [0x13])))
Yes. > Because the two subreg cancel each other out. Well, why did it ever think of using DI at all? > This would be a thing to add to simplify-rtx.c. This is probably specific to combine actually. Segher