HomePhabricator

[InstCombine][SVE] Fix visitGetElementPtrInst for scalable type.

Authored by huihuiz on Apr 14 2020, 12:38 PM.

Description

[InstCombine][SVE] Fix visitGetElementPtrInst for scalable type.

Summary:
This patch fix the following issues in InstCombiner::visitGetElementPtrInst

  1. Skip for scalable type if transformation requires fixed size number of vector element.
  2. Skip for scalable type if transformation relies on compile-time known type alloc size.
  3. Use VectorType::getElementCount when scalable property is used to construct new VectorType.
  4. Use TypeSize::getKnownMinSize when minimal size of a scalable type is valid to determine GEP 'inbounds'.
  5. Explicitly call TypeSize::getFixedSize to avoid implicit type conversion to uint64_t.

Reviewers: sdesmalen, efriedma, spatel, ctetreau

Reviewed By: efriedma

Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits

Tags: #llvm

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

Details

Committed
huihuizApr 14 2020, 12:38 PM
Reviewer
efriedma
Differential Revision
D78081: [InstCombine][SVE] Fix visitGetElementPtrInst for scalable type.
Parents
rGcea112f422ce: [lldb] Fix a typo in a test name
Branches
Unknown
Tags
Unknown