This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] Improvements for BUILD_VECTOR Vol. 2
ClosedPublic

Authored by nemanjai on Oct 26 2016, 4:33 AM.

Details

Summary

This is the second in the series of patches that https://reviews.llvm.org/D25580 is split into.
This patch converts (build_vector (fp_to_[su]i $A), (fp_to_[su]i $B), ...) into (fp_to_[su]i (build_vector $A, $B, ...))).

There is no test case included in this patch as the last patch will have the test case that covers all the different ways of building a vector.

Diff Detail

Repository
rL LLVM

Event Timeline

nemanjai updated this revision to Diff 75848.Oct 26 2016, 4:33 AM
nemanjai retitled this revision from to [PowerPC] Improvements for BUILD_VECTOR Vol. 2.
nemanjai updated this object.
nemanjai set the repository for this revision to rL LLVM.
nemanjai added a subscriber: llvm-commits.

This patch depends on https://reviews.llvm.org/D25912 but I don't see a way to add a dependency with the new Phabricator interface.

nemanjai added a subscriber: wschmidt.
kbarton edited edge metadata.Oct 31 2016, 5:57 PM

Aside from some nits about comments and formatting this LGTM.

lib/Target/PowerPC/PPCISelLowering.cpp
10521

Please convert this to a doxygen-style comment.

10527

I know this name is descriptive of what the function does, but it's very difficult to read.
Is there another name possible? Maybe something containing transpose, exchange, swap or refactor?

10552

Use ++i not i++

10569

++i

10586

space between if (

kbarton accepted this revision.Oct 31 2016, 5:57 PM
kbarton edited edge metadata.
This revision is now accepted and ready to land.Oct 31 2016, 5:57 PM
nemanjai added inline comments.Nov 1 2016, 2:47 AM
lib/Target/PowerPC/PPCISelLowering.cpp
10521

OK, I'll do that.

10527

OK I'll change it to
combineElementTruncationToVectorTruncation
I think it sufficiently conveys what the function does and it reads quite nicely as well.

10552

OK.

10569

OK. Sorry, just a habit to use pre-increment for class types and post-increment for primitive types. But I'll change it.

10586

Good catch. Will do.

nemanjai updated this revision to Diff 76703.Nov 2 2016, 7:58 AM
nemanjai edited edge metadata.

This is already approved, but I'm just updating it so that the version that will be committed is on Phabricator.

nemanjai closed this revision.Nov 29 2016, 3:46 PM

Committed revision 288218.