This is an archive of the discontinued LLVM Phabricator instance.

[IR] Allow the 'align' param attr on vectors of pointers
ClosedPublic

Authored by frasercrmck on Dec 6 2021, 8:32 AM.

Details

Summary

This patch extends the available uses of the 'align' parameter attribute
to include vectors of pointers. The attribute specifies pointer
alignment element-wise.

This change was previously requested and discussed in D87304.

The vector predication (VP) intrinsics intend to use this for scatter
and gather operations, as they lack the explicit alignment parameter
that the masked versions use.

Diff Detail

Event Timeline

frasercrmck created this revision.Dec 6 2021, 8:32 AM
frasercrmck requested review of this revision.Dec 6 2021, 8:32 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 6 2021, 8:32 AM
arsenm added a subscriber: arsenm.Dec 6 2021, 8:34 AM

I think this needs some more changes down in codegen to pass them through

I think this needs some more changes down in codegen to pass them through

Specifically for the VP intrinsics, I have D114423 to fix the missing codegen translation. Is that what you were referring to?

anna added a comment.Dec 9 2021, 6:39 AM

Change LGTM. @jdoerfert any additional comments?

  • rebase

ping

nikic accepted this revision.Jan 3 2022, 3:20 AM
nikic added a subscriber: nikic.

Makes sense to me.

llvm/test/Bitcode/attributes.ll
482

Shouldn't this be @f83?

This revision is now accepted and ready to land.Jan 3 2022, 3:20 AM
  • fix test and update for typed/opaque split
frasercrmck marked an inline comment as done.Jan 3 2022, 3:51 AM
frasercrmck added inline comments.
llvm/test/Bitcode/attributes.ll
482

Yes it should, thanks. I also needed to update for CHECK-TYPED and CHECK-OPAQUE which I've now done.

This revision was landed with ongoing or failed builds.Jan 3 2022, 4:42 AM
This revision was automatically updated to reflect the committed changes.
frasercrmck marked an inline comment as done.