[PATCH] D139668: [InstCombine] try to fold a pair of insertelements into one insertelement
Dave Green via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 11 23:51:29 PST 2022
dmgreen accepted this revision.
dmgreen added a comment.
This revision is now accepted and ready to land.
LGTM. Thanks for coming up with and working on the alternative.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp:1528
+ // inselt (inselt BaseVec, (trunc X), Index0), (trunc (lshr X, BW/2)), Index1
+ // TODO: The insertion order could be reversed.
+ // TODO: Detect smaller fractions of the scalar.
----------------
I believe in DAG we canonicalize to increasing insert indices, without extra uses. Not sure if that would be useful here too.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139668/new/
https://reviews.llvm.org/D139668
More information about the llvm-commits
mailing list