[llvm] c4d6867 - InstSimplify: strip bad TODO (NFC) (#92754)

via llvm-commits llvm-commits at lists.llvm.org
Tue May 21 00:02:15 PDT 2024


Author: Ramkumar Ramachandra
Date: 2024-05-21T08:02:10+01:00
New Revision: c4d6867b786a0c850de824fe5452acf6c3c676ca

URL: https://github.com/llvm/llvm-project/commit/c4d6867b786a0c850de824fe5452acf6c3c676ca
DIFF: https://github.com/llvm/llvm-project/commit/c4d6867b786a0c850de824fe5452acf6c3c676ca.diff

LOG: InstSimplify: strip bad TODO (NFC) (#92754)

foldIdentityShuffles requires two sets of canceling shuffles. If there
are any intervening instructions, they are feeding in the result of the
first set of shuffles. To eliminate the two sets of shuffles, you'd have
to rewrite the head of the intervening instructions to feed in the
operand of the first set of shuffles. Since modifying the IR in any way
is disallowed by an analysis, strip this bad TODO.

Added: 
    

Modified: 
    llvm/lib/Analysis/InstructionSimplify.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Analysis/InstructionSimplify.cpp b/llvm/lib/Analysis/InstructionSimplify.cpp
index 37a7259a5cd02..e88736b5fab8d 100644
--- a/llvm/lib/Analysis/InstructionSimplify.cpp
+++ b/llvm/lib/Analysis/InstructionSimplify.cpp
@@ -5346,9 +5346,6 @@ static Value *foldIdentityShuffles(int DestElt, Value *Op0, Value *Op1,
         SourceShuf->getMaskValue(RootElt), RootVec, MaxRecurse);
   }
 
-  // TODO: Look through bitcasts? What if the bitcast changes the vector element
-  // size?
-
   // The source operand is not a shuffle. Initialize the root vector value for
   // this shuffle if that has not been done yet.
   if (!RootVec)


        


More information about the llvm-commits mailing list