This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Extend narrow values to allow using truncating scatters
ClosedPublic

Authored by dmgreen on Jun 4 2021, 9:53 AM.

Details

Summary

As a minor adjustment to the existing lowering of offset scatters, this extends any smaller-than-legal vectors into full vectors using a zext, so that the truncating scatters can be used. Due to the way MVE legalizes the vectors this should be cheap in most situations, and will prevent the vector from being scalarized.

Diff Detail

Event Timeline

dmgreen created this revision.Jun 4 2021, 9:53 AM
dmgreen requested review of this revision.Jun 4 2021, 9:53 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 4 2021, 9:53 AM
samtebbs added inline comments.Jun 8 2021, 9:03 AM
llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp
641–642

What happens here if InputTy is an integer (as I assume is allowed by isIntOrIntVectorTy())?

dmgreen added inline comments.Jun 8 2021, 10:50 AM
llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp
641–642

We will already have ruled out scalar integer types, we know InputTy will be some sort of vector. So isIntOrIntVectorTy is really just saying "is it an integer vector type"

samtebbs accepted this revision.Jun 9 2021, 7:47 AM

Looks good to me. It's up to you if you would like to add a comment as mentioned in my reply.

llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp
641–642

Cool. It might be worth adding this info as a brief comment.

This revision is now accepted and ready to land.Jun 9 2021, 7:47 AM
This revision was landed with ongoing or failed builds.Jun 15 2021, 9:45 AM
This revision was automatically updated to reflect the committed changes.