[all-commits] [llvm/llvm-project] ee26a3: [SVE] Make ConstantFoldGetElementPtr work for scal...

david-arm via All-commits all-commits at lists.llvm.org
Wed Jun 24 23:56:07 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: ee26a31e7b02e124d71091d47f2ae624774e5e0a
      https://github.com/llvm/llvm-project/commit/ee26a31e7b02e124d71091d47f2ae624774e5e0a
  Author: David Sherwood <david.sherwood at arm.com>
  Date:   2020-06-25 (Thu, 25 Jun 2020)

  Changed paths:
    M llvm/lib/IR/ConstantFold.cpp
    M llvm/test/Transforms/InstSimplify/gep.ll

  Log Message:
  -----------
  [SVE] Make ConstantFoldGetElementPtr work for scalable vectors of indices

This patch fixes a compiler crash that was hit when trying to simplify
the following code:

getelementptr [2 x i64], [2 x i64]* null, i64 0, <vscale x 2 x i64> zeroinitializer

For the case where we have a null pointer value like above, we just
need to ensure we don't assume the indices are always fixed width.

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




More information about the All-commits mailing list