[PATCH] D139668: [InstCombine] try to fold a pair of insertelements into one insertelement
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 12 06:30:35 PST 2022
spatel added inline comments.
================
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.
----------------
dmgreen wrote:
> I believe in DAG we canonicalize to increasing insert indices, without extra uses. Not sure if that would be useful here too.
Thanks! That sounds like a good transform for IR too. I'll look at that as a follow-up.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139668/new/
https://reviews.llvm.org/D139668
More information about the llvm-commits
mailing list