[all-commits] [llvm/llvm-project] 1ad521: [InstCombine] Add fold for extracting known elemen...

CarolineConcatto via All-commits all-commits at lists.llvm.org
Thu Jun 10 05:37:59 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1ad52105eb88bb25cb5a22e15df2ef442f553645
      https://github.com/llvm/llvm-project/commit/1ad52105eb88bb25cb5a22e15df2ef442f553645
  Author: Caroline Concatto <caroline.concatto at arm.com>
  Date:   2021-06-10 (Thu, 10 Jun 2021)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
    M llvm/test/Transforms/InstCombine/vscale_extractelement.ll

  Log Message:
  -----------
  [InstCombine] Add fold for extracting known elements from a stepvector

This patch allows folding stepvector + extract to the lane when the lane is
lower than the minimum size of the scalable vector. This fold is possible
because lane X of a stepvector is also X!
For instance, extracting element 3 of a <vscale x 4 x i64>stepvector is 3.

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




More information about the All-commits mailing list