[all-commits] [llvm/llvm-project] ac8c72: [IR] Allow constant folding (insertelement <vscale...

Craig Topper via All-commits all-commits at lists.llvm.org
Fri Apr 15 17:44:55 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ac8c720d4863b2b520f31b156ee5e55aff2e1cde
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2022-04-15 (Fri, 15 Apr 2022)

  Changed paths:
    M llvm/lib/IR/ConstantFold.cpp
    M llvm/test/Transforms/InstSimplify/ConstProp/InsertElement.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/sve-widen-phi.ll

  Log Message:
  [IR] Allow constant folding (insertelement <vscale x 2 x i32> zeroinitializer, i32 0, i32 i32 0.

Most of insertelement constant folding is blocked if the vector type
is scalable. I believe we can make an exception for inserting null
into an all zeros vector.

Reviewed By: nikic

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

More information about the All-commits mailing list