This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Favor extended reg patterns for sub
ClosedPublic

Authored by gberry on Jul 28 2015, 11:39 AM.

Details

Summary

Favor the extended reg patterns over the shifted reg patterns that match
only the operand shift and not the full sign/zero extend and shift.

Diff Detail

Event Timeline

gberry updated this revision to Diff 30839.Jul 28 2015, 11:39 AM
gberry retitled this revision from to [AArch64] Favor extended reg patterns for sub.
gberry updated this object.
gberry added reviewers: jmolloy, t.p.northover.
gberry added subscribers: llvm-commits, mcrosier.

Is this avoiding a shift plus extend sub, for a shift-extend sub?

If so, would be good to add a CHECK-NOT for the extra instructions that you don't want to see.

Otherwise, looks good to me.

t.p.northover accepted this revision.Jul 31 2015, 7:08 AM
t.p.northover edited edge metadata.

Looks good to me, it's just matching the behaviour for default patterns in InstrFormats as far as I can see and isn't bad for any CPU I know of.

Tim.

This revision is now accepted and ready to land.Jul 31 2015, 7:08 AM

Is this avoiding a shift plus extend sub, for a shift-extend sub?

If so, would be good to add a CHECK-NOT for the extra instructions that you don't want to see.

I don't think this would add much to the test since we're already checking for the shift-extend subs. Adding CHECK-NOTs for extra extends or shifts would just be checking that we're not generating redundant code, which doesn't seem to be of much value. Do you agree?

rengolin accepted this revision.Jul 31 2015, 8:20 AM
rengolin added a reviewer: rengolin.

I don't think this would add much to the test since we're already checking for the shift-extend subs. Adding CHECK-NOTs for extra extends or shifts would just be checking that we're not generating redundant code, which doesn't seem to be of much value. Do you agree?

That's a good point. LGTM.

This revision was automatically updated to reflect the committed changes.