[PATCH] D109537: [InstCombine] move extend after insertelement if both operands are extended

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 9 12:19:41 PDT 2021


spatel created this revision.
spatel added reviewers: anton-afanasyev, andreil99, RKSimon.
Herald added subscribers: hiraditya, mcrosier.
spatel requested review of this revision.
Herald added a project: LLVM.

I was wondering how instcombine does on the examples in D109236 <https://reviews.llvm.org/D109236>, and we're missing what looks like a basic transform:

  inselt (ext X), (ext Y), Index --> ext (inselt X, Y, Index)

https://alive2.llvm.org/ce/z/z2aBu9

If this looks ok, then instcombine can handle the relatively simple tests in the other patch. 
So we might want to make those a bit longer to show the power of the more general approach in -aggressive-instcombine.


https://reviews.llvm.org/D109537

Files:
  llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
  llvm/test/Transforms/InstCombine/insert-ext.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109537.371688.patch
Type: text/x-patch
Size: 5936 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210909/163c87b7/attachment.bin>


More information about the llvm-commits mailing list