[all-commits] [llvm/llvm-project] 42dace: [Hexagon] Use getTypeAllocSize to compute differen...

bcahoon via All-commits all-commits at lists.llvm.org
Mon Sep 13 17:05:54 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 42dace9c5b5ea059e42aaf2ee201ad9da9dc8535
      https://github.com/llvm/llvm-project/commit/42dace9c5b5ea059e42aaf2ee201ad9da9dc8535
  Author: Brendon Cahoon <bcahoon at quicinc.com>
  Date:   2021-09-13 (Mon, 13 Sep 2021)

  Changed paths:
    M llvm/lib/Target/Hexagon/HexagonVectorCombine.cpp
    A llvm/test/CodeGen/Hexagon/autohvx/vector-align-addr.ll

  Log Message:
  -----------
  [Hexagon] Use getTypeAllocSize to compute difference between objects

The code was using getTypeStoreSize to calculate the difference
between consecutive objects. The calculation was incorrect due
to padding that is added between consecutive objects. The
getTypeAllocSize includes the padding amount. For example,
if the type is [19 x i8], the difference between consecutive
objects is 32 bytes, not 19 bytes.

A second case for getTypeAllocSize is needed when computing
the pointer values for the vector accesses. The calculation needs
to account for the padding as well.

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




More information about the All-commits mailing list