This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Do not use ABI alignment for mops.memset.tag
ClosedPublic

Authored by nikic on Feb 1 2022, 12:45 AM.

Details

Summary

Pointer element types do not imply that the pointer is ABI aligned. We should be using either an explicit align attribute here, or fall by to an alignment of 1.

This fixes a new element type access introduced in D117764.

Diff Detail

Event Timeline

nikic created this revision.Feb 1 2022, 12:45 AM
nikic requested review of this revision.Feb 1 2022, 12:45 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 1 2022, 12:45 AM

Thanks. Can you add a test case for a @llvm.aarch64.mops.memset.tag with an align attribute on the operand?

nikic updated this revision to Diff 404867.Feb 1 2022, 2:58 AM

Add test with align attribute. I don't think this has any actual effect, at least I don't see how the lowering would depend on alignment.

dmgreen accepted this revision.Feb 1 2022, 3:42 AM

Hmm. I was expecting to be able to test this by printing the MIR and inspecting the operand, but it appears that the alignment gets lost as we convert to a machine node. I'm not sure why.

Like you said the alignment won't be used for much though, so I think this LGTM as-is. So long as we have a test that the align operand isn't doing anything funny, that Ok on its own. Thanks.

This revision is now accepted and ready to land.Feb 1 2022, 3:42 AM
This revision was automatically updated to reflect the committed changes.