This is an archive of the discontinued LLVM Phabricator instance.

[SVE] Fix incorrect predicate for fixed length int/fp conversion.
ClosedPublic

Authored by paulwalker-arm on Nov 19 2022, 4:28 AM.

Details

Summary

When performing shrinking int/fp conversions the predicate should
be created to match the original fixed length vector type so the
unused lanes don't trigger side effects.

This patch also includes related refactoring to better detect such
issues and streamline the code a little.

Diff Detail

Event Timeline

paulwalker-arm created this revision.Nov 19 2022, 4:28 AM
Herald added a project: Restricted Project. · View Herald Transcript
paulwalker-arm requested review of this revision.Nov 19 2022, 4:28 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 19 2022, 4:28 AM
paulwalker-arm added a subscriber: hassnaa-arm.

@hassnaa-arm: Just a heads up that this patch will affect the output for some of the tests you're adding as part of D136858.

llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
23037
NOTE: Although using bitsGE maintains the original behaviour, I figure for the EQ case the else block is simpler and so might save a few cycles of compile time whilst having no affect on the generated code.
david-arm accepted this revision.Nov 21 2022, 1:40 AM

LGTM! A work of art Paul. :)

This revision is now accepted and ready to land.Nov 21 2022, 1:40 AM
Matt added a subscriber: Matt.Nov 21 2022, 3:12 PM
This revision was landed with ongoing or failed builds.Nov 22 2022, 6:45 AM
This revision was automatically updated to reflect the committed changes.