[all-commits] [llvm/llvm-project] 90ad78: [IR] Prefer scalar type for struct indexes in GEP ...

Eli Friedman via All-commits all-commits at lists.llvm.org
Tue Jun 23 16:15:03 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 90ad786947cc861756c95238f96c267b2a3c4849
      https://github.com/llvm/llvm-project/commit/90ad786947cc861756c95238f96c267b2a3c4849
  Author: Eli Friedman <efriedma at quicinc.com>
  Date:   2020-06-23 (Tue, 23 Jun 2020)

  Changed paths:
    M llvm/lib/IR/Constants.cpp
    M llvm/lib/IR/DataLayout.cpp
    M llvm/test/Analysis/ConstantFolding/vectorgep-crash.ll
    M llvm/test/Transforms/InstSimplify/gep.ll

  Log Message:
  -----------
  [IR] Prefer scalar type for struct indexes in GEP constant expressions.

This has two advantages: one, it's simpler, and two, it doesn't require
heroic pattern matching with scalable vectors.

Also includes a small fix to DataLayout to allow the scalable vector
testcase to work correctly.

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




More information about the All-commits mailing list