[llvm] [VectorCombine] Add intrinsics handling to shuffleToIdentity (PR #91000)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Wed May 8 14:23:16 PDT 2024


================
@@ -1729,7 +1729,9 @@ bool VectorCombine::foldShuffleToIdentity(Instruction &I) {
       return false;
 
     // Look for an identity value.
-    if (Item[0].second == 0 && Item[0].first->getType() == Ty &&
+    if (Item[0].second == 0 &&
+        cast<FixedVectorType>(Item[0].first->getType())->getNumElements() ==
----------------
RKSimon wrote:

Do we have any cases where this might not be FixedVectorType?

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


More information about the llvm-commits mailing list