PPC: Don't restrict lvsl generation to after type legalization
authorHal Finkel <hfinkel@anl.gov>
Sun, 15 Sep 2013 22:09:58 +0000 (22:09 +0000)
committerHal Finkel <hfinkel@anl.gov>
Sun, 15 Sep 2013 22:09:58 +0000 (22:09 +0000)
commitfabfb5d5880354983c89c6f475312dd359e5bb03
tree5df205fea4949ba0c64e38416d9aee31b440cf00
parent94ee55d4b39d6506cf4e0f4e4b1c0b7fbbfeaed5
PPC: Don't restrict lvsl generation to after type legalization

This is a re-commit of r190764, with an extra check to make sure that we're not
performing the transformation on illegal types (a small test case has been
added for this as well).

Original commit message:

The PPC backend uses a target-specific DAG combine to turn unaligned Altivec
loads into a permutation-based sequence when possible. Unfortunately, the
target-specific DAG combine is not always called on all loads of interest
(sometimes the routines in DAGCombine call CombineTo such that the new node and
users are not added to the worklist); allowing the combine to trigger early
(before type legalization) mitigates this problem. Because the autovectorizers
only create legal vector types, I don't expect a lot of cases where this
optimization is enabled by type legalization in practice.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190771 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPCISelLowering.cpp
test/CodeGen/PowerPC/unal-altivec2.ll [new file with mode: 0644]