[all-commits] [llvm/llvm-project] e5a32d: [InstCombine] move extend after insertelement if b...

RotateRight via All-commits all-commits at lists.llvm.org
Wed Sep 15 11:39:03 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e5a32d720ef2d8989442a533e1dd2d7e667155c1
      https://github.com/llvm/llvm-project/commit/e5a32d720ef2d8989442a533e1dd2d7e667155c1
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2021-09-15 (Wed, 15 Sep 2021)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
    M llvm/test/Transforms/InstCombine/insert-ext.ll

  Log Message:
  -----------
  [InstCombine] move extend after insertelement if both operands are extended

I was wondering how instcombine does on the examples in D109236,
and we're missing a basic transform:

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

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

Note that there are several possible extensions of this fold
(see TODO comments).

Differential Revision: https://reviews.llvm.org/D109537




More information about the All-commits mailing list