[all-commits] [llvm/llvm-project] 44bb40: [ConstraintElimination] Do not crash on vector GEP...

Björn Pettersson via All-commits all-commits at lists.llvm.org
Wed Nov 2 02:05:03 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 44bb4099cd75dfd4800effe98b08ed720d71029a
      https://github.com/llvm/llvm-project/commit/44bb4099cd75dfd4800effe98b08ed720d71029a
  Author: Bjorn Pettersson <bjorn.a.pettersson at ericsson.com>
  Date:   2022-11-02 (Wed, 02 Nov 2022)

  Changed paths:
    M llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
    A llvm/test/Transforms/ConstraintElimination/geps-ptrvector.ll

  Log Message:
  -----------
  [ConstraintElimination] Do not crash on vector GEP in decomposeGEP

Commit 359bc5c541ae4b02 caused
 Assertion `isa<To>(Val) && "cast<Ty>() argument of incompatible type!"'
failures in decomposeGEP when the GEP pointer operand is a vector.

Fix is to use DataLayout::getIndexTypeSizeInBits when fetching the
index size, as it will use the scalar type in case of a ptr vector.

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




More information about the All-commits mailing list