[PowerPC] Remove undefs from splat input when changing shuffle mask
authorNemanja Ivanovic <nemanja.i.ibm@gmail.com>
Thu, 2 Jul 2020 15:14:54 +0000 (10:14 -0500)
committerNemanja Ivanovic <nemanja.i.ibm@gmail.com>
Thu, 2 Jul 2020 17:26:56 +0000 (12:26 -0500)
commita701dc5510ab8e977dcb797035475e641d6a353a
tree41d5f323669477cc392d45c18f58d27401495392
parentef2f46e1f6a63040734c48ed53893298df14b6fa
[PowerPC] Remove undefs from splat input when changing shuffle mask

As of 1fed131660b2c5d3ea7007e273a7a5da80699445, we have code that
changes shuffle masks so that we can put the shuffle in a canonical
form that can be matched to a single instruction. However, it
does not properly account for undef elements in the BUILD_VECTOR
that is the RHS splat so we can end up with undefs where they
shouldn't be. This patch converts the splat input with undefs to
one without.
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
llvm/test/CodeGen/PowerPC/canonical-merge-shuffles.ll