[llvm] [PowerPC] Fix shuffle combine with undef elements (PR #77787)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 12 01:06:21 PST 2024


================
@@ -15428,15 +15428,15 @@ SDValue PPCTargetLowering::combineVectorShuffle(ShuffleVectorSDNode *SVN,
     // vector_shuffle<0,16,1,17,2,18,3,19,4,20,5,21,6,22,7,23> t1, <zero>
     if (Mask[0] < NumElts)
       for (int i = 1, e = Mask.size(); i < e; i += 2) {
-        if (ShuffV[i] < 0)
+        if (ShuffV[i] < 0 || ShuffV[i - 1] < 0)
----------------
nikic wrote:

Done!

https://github.com/llvm/llvm-project/pull/77787


More information about the llvm-commits mailing list