[llvm] [VectorCombine] Add support for zext/sext/trunc to shuffleToIdentity (PR #92696)
    David Green via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue May 28 05:09:54 PDT 2024
    
    
  
================
@@ -1753,8 +1756,7 @@ static Value *generateNewInstTree(ArrayRef<InstLane> Item, FixedVectorType *Ty,
 // do so.
 bool VectorCombine::foldShuffleToIdentity(Instruction &I) {
   auto *Ty = dyn_cast<FixedVectorType>(I.getType());
-  if (!Ty || !isa<Instruction>(I.getOperand(0)) ||
-      !isa<Instruction>(I.getOperand(1)))
----------------
davemgreen wrote:
Sure - I can split it out. It will be needed for many of the tests, but there should be enough to test various cases still.
https://github.com/llvm/llvm-project/pull/92696
    
    
More information about the llvm-commits
mailing list