This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Lower MVE i1 inserts through shifts, not inreg extend
Changes PlannedPublic

Authored by dmgreen on Sep 24 2019, 4:12 AM.

Details

Summary

This is an alternative to D67614. Instead of lowering i1 inserts through a SIGN_EXTEND_INREG and a BFI, we can go via a SHL and a SRA (and the BFI). This, instead of being optimised to a rsb ubfx pair, will become a sbfx as desired.

Diff Detail

Event Timeline

dmgreen created this revision.Sep 24 2019, 4:12 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 24 2019, 4:12 AM

If SelectionDAGLegalize::ExpandNode is expanding SIGN_EXTEND_INREG of i1 to a non-canonical form, maybe it makes more sense to fix that, instead of trying to avoid that codepath? I mean, this is fine, given we know it's going to get expanded anyway. But the same problem might come up again later out of target-independent code generating an i1 SIGN_EXTEND_INREG.

But we can merge this now and deal with that later, if you want.

Just checking (I am going through my list of phab review), is this still relevant?

dmgreen planned changes to this revision.Dec 3 2021, 12:37 AM

Good question :) I think it improved some codegen in places we hope never actually comes up in practice.

This will at least need a rebase to see if it's still relevant.