This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] Generate lxsd instead of the ld->mtvsrd sequence for vector loads
ClosedPublic

Authored by amyk on Jul 23 2018, 1:57 PM.

Details

Summary

This patch addresses:

  • Implementation within PPCISelLowering.cpp to check if we should use direct load into vector instructions (such as lxsd/lfd ) when the scalar_to_vector function is used; which will allow us to catch as many cases of the scalar_to_vector uses as possible to translate the ld->mtvsrd sequence into lxsd.
  • Test cases to exhibit the behaviour of emitting lxsd/lfd.

Diff Detail

Repository
rL LLVM

Event Timeline

amyk created this revision.Jul 23 2018, 1:57 PM
nemanjai added inline comments.Aug 13 2018, 6:42 AM
llvm/test/CodeGen/PowerPC/pre-inc-disable.ll
11 ↗(On Diff #156870)

I don't think this is a meaningful test since the corresponding RUN line doesn't include something like -debug-only=isel.

amyk updated this revision to Diff 160592.Aug 14 2018, 8:23 AM

Updated the patch to address:

  • Making the test cases a little bit less exhaustive (removing CHECK-NEXT's)
  • unnecessary whitespaces
nemanjai accepted this revision.Aug 14 2018, 10:31 AM

LGTM.

llvm/test/CodeGen/PowerPC/pre-inc-disable.ll
9 ↗(On Diff #160592)

This is no longer required since you are not checking for anything that requires an asserts build.

This revision is now accepted and ready to land.Aug 14 2018, 10:31 AM
amyk updated this revision to Diff 160888.Aug 15 2018, 12:24 PM
This comment was removed by amyk.
amyk updated this revision to Diff 160889.Aug 15 2018, 12:31 PM

Updated the test case again, removing the assert line as previously addressed.

This revision was automatically updated to reflect the committed changes.