This is an archive of the discontinued LLVM Phabricator instance.

[CodeGen][SVE] Avoid scalarizing zero splat stores on scalable vectors.
ClosedPublic

Authored by hkao13 on May 29 2020, 11:25 AM.

Details

Summary

Implemented in replaceZeroVectorStore(). Fixes several warnings in AArch64 SVE unit tests.

Diff Detail

Event Timeline

hkao13 created this revision.May 29 2020, 11:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 29 2020, 11:25 AM

After D80720 this function will no longer be called from splitStores for scalable vectors, but it still makes sense to bail out early in case that ever changes.

llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
12018–12022

Probably better to bail out directly if VT is scalable and leave the call to getVectorNumElements() intact.

hkao13 updated this revision to Diff 268472.Jun 4 2020, 8:02 AM
hkao13 retitled this revision from [CodeGen][SVE] Replace deprecated call to getVectorNumElements() with getVectorElemetCount() in replaceZeroVectorStore() to [CodeGen][SVE] Avoid scalarizing zero splat stores on scalable vectors..
hkao13 edited the summary of this revision. (Show Details)
hkao13 marked an inline comment as done.Jun 4 2020, 8:07 AM
hkao13 added inline comments.
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
12018–12022

Thanks for the review. I reverted the change to use getVectorNumElements(), and added a check above.

sdesmalen accepted this revision.Jun 8 2020, 10:08 AM

LGTM

llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
12020

I think you can remove the condition || !VT.isFixedLengthVector(), because this function would otherwise break if it isn't.

This revision is now accepted and ready to land.Jun 8 2020, 10:08 AM
hkao13 updated this revision to Diff 269296.Jun 8 2020, 11:19 AM
hkao13 marked an inline comment as done.Jun 8 2020, 11:26 AM
hkao13 added inline comments.
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
12020

Fixed, thanks for feedback.

This revision was automatically updated to reflect the committed changes.