[llvm] InstSimplify: lookthru casts, binops in folding shuffles (PR #92668)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Sat May 18 12:29:15 PDT 2024
================
@@ -5468,16 +5517,26 @@ static Value *simplifyShuffleVectorInst(Value *Op0, Value *Op1,
// shuffle. This handles simple identity shuffles as well as chains of
// shuffles that may widen/narrow and/or move elements across lanes and back.
Value *RootVec = nullptr;
- for (unsigned i = 0; i != MaskNumElts; ++i) {
+ ReplacementTy ReplaceInRootVec;
+ for (unsigned Idx = 0; Idx != MaskNumElts; ++Idx) {
// Note that recursion is limited for each vector element, so if any element
// exceeds the limit, this will fail to simplify.
- RootVec =
- foldIdentityShuffles(i, Op0, Op1, Indices[i], RootVec, MaxRecurse);
+ std::pair<Value *, ReplacementTy> Res =
----------------
arsenm wrote:
C++17 structured binding
https://github.com/llvm/llvm-project/pull/92668
More information about the llvm-commits
mailing list