Page MenuHomePhabricator

[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
12071–12075

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
12071–12075

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

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

LGTM

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

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.Mon, Jun 8, 10:08 AM
hkao13 updated this revision to Diff 269296.Mon, Jun 8, 11:19 AM
hkao13 marked an inline comment as done.Mon, Jun 8, 11:26 AM
hkao13 added inline comments.
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
12073

Fixed, thanks for feedback.

This revision was automatically updated to reflect the committed changes.