This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Unify the integer min/max vector selection patterns with the intrinsic ones
ClosedPublic

Authored by sbaranga on Aug 24 2015, 3:53 AM.

Details

Summary

This change lowers the aarch64 integer vector min/max intrinsic nodes to
generic min/max nodes and replaces the intrinsic selection patterns with
the generic ones.

There should already be testing in place for this, so no further tests
were added.

Diff Detail

Event Timeline

sbaranga updated this revision to Diff 32943.Aug 24 2015, 3:53 AM
sbaranga retitled this revision from to [AArch64] Unify the integer min/max vector selection patterns with the intrinsic ones.
sbaranga updated this object.
sbaranga added a reviewer: jmolloy.
sbaranga added a subscriber: llvm-commits.
jmolloy accepted this revision.Aug 24 2015, 5:35 AM
jmolloy edited edge metadata.

LGTM with my coding style comment addressed.

lib/Target/AArch64/AArch64ISelLowering.cpp
2187

I don't really like having the switch inside the switch - each case is just one line anyway, I think we're removing readability.

This revision is now accepted and ready to land.Aug 24 2015, 5:35 AM
sbaranga added inline comments.Aug 24 2015, 6:50 AM
lib/Target/AArch64/AArch64ISelLowering.cpp
2187

In that case would removing this switch and having a

return DAG.getNode(ISD::SMIN, dl, Op.getValueType(), ...)

for each min/max case in the original switch be better here?

sbaranga updated this revision to Diff 33193.Aug 26 2015, 4:11 AM
sbaranga edited edge metadata.

Removed inner switch from the intrinsics lowering code.

sbaranga closed this revision.Aug 26 2015, 4:12 AM

Committed in r246030, thanks!

-Silviu