This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][SVE] Add lowering for llvm.maxnum|minnum for scalable type.
ClosedPublic

Authored by huihuiz on Dec 3 2020, 2:11 PM.

Details

Summary

LLVM intrinsic llvm.maxnum|minnum is overloaded intrinsic, can be used on any
floating-point or vector of floating-point type.
This patch extends current infrastructure to support scalable vector type.

This patch also fix a warning message of incorrect use of EVT::getVectorNumElements()
for scalable type, when DAGCombiner trying to split scalable vector.

Diff Detail

Event Timeline

huihuiz created this revision.Dec 3 2020, 2:11 PM
huihuiz requested review of this revision.Dec 3 2020, 2:11 PM
sdesmalen added inline comments.Dec 7 2020, 3:56 AM
llvm/test/CodeGen/AArch64/sve-fp.ll
597

Can you also add at least one case for each intrinsic (maxnum and minnum) where the vector needs splitting? e.g. using either nxv16f16, nxv8f32 or nxv4f64.

huihuiz updated this revision to Diff 310012.Dec 7 2020, 1:57 PM
huihuiz marked an inline comment as done.
huihuiz edited the summary of this revision. (Show Details)

Thanks for the feedback!
Test cases for vector splitting added. Also fix the warning message caused by extracting subvector.

huihuiz edited the summary of this revision. (Show Details)Dec 7 2020, 2:08 PM
sdesmalen accepted this revision.Dec 8 2020, 12:55 AM

Thanks for adding the tests and fixing the warnings, LGTM!

This revision is now accepted and ready to land.Dec 8 2020, 12:55 AM
This revision was landed with ongoing or failed builds.Dec 8 2020, 9:36 AM
This revision was automatically updated to reflect the committed changes.