[VectorCombine] Only consider shuffle uses with the same type.
authorDavid Green <david.green@arm.com>
Sat, 16 Jul 2022 12:23:39 +0000 (13:23 +0100)
committerDavid Green <david.green@arm.com>
Sat, 16 Jul 2022 12:23:39 +0000 (13:23 +0100)
commit4b7913c357335a6cbb25bf3051c319cdc0e7772f
tree134c8e67163cbc0878566649ecaff5f46b2268f7
parent2bb6b03d713ba91d2c1efdfbc06982598568a52c
[VectorCombine] Only consider shuffle uses with the same type.

The backend getShuffleCosts do not currently handle shuffles that change
size very well. Limit the shuffles we collect to the same type to make
sure they do not cause issues as reported in D128732.
llvm/lib/Transforms/Vectorize/VectorCombine.cpp
llvm/test/Transforms/VectorCombine/AArch64/select-shuffle.ll