This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][GlobalISel] Lower vector types for min/max
ClosedPublic

Authored by Rin on Jul 5 2021, 7:10 AM.

Details

Summary

This patch allows vector types to be lowered for the min/max instruction in GlobalISel.

Diff Detail

Event Timeline

Rin created this revision.Jul 5 2021, 7:10 AM
Rin requested review of this revision.Jul 5 2021, 7:10 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 5 2021, 7:10 AM
Rin edited the summary of this revision. (Show Details)Jul 5 2021, 7:11 AM
Rin added reviewers: dmgreen, SjoerdMeijer.
paquette added inline comments.Jul 6 2021, 10:35 AM
llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
173

I think you can use the helper functions in LegalizerInfo.h here to make this a little cleaner:

.lowerIf(any(isScalar(0), isVector(0)))
aemerson added inline comments.Jul 6 2021, 11:33 PM
llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
173

At this point, the rule just becomes equivalent to lower().

Rin added inline comments.Jul 7 2021, 1:07 AM
llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
173

Good point, I'll just make it lower()

Rin updated this revision to Diff 356893.Jul 7 2021, 1:28 AM
Rin edited the summary of this revision. (Show Details)

Address review comments

Rin marked 2 inline comments as done.Jul 7 2021, 1:28 AM
aemerson accepted this revision.Jul 7 2021, 1:31 AM

LGTM.

This revision is now accepted and ready to land.Jul 7 2021, 1:31 AM
This revision was automatically updated to reflect the committed changes.