[PATCH] D109403: Few bug fixes in HexagonVectorCombine

Ankit via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 7 17:06:59 PDT 2021


quic_aankit added a comment.

  Fix an instruction move in HexagonVectorCombine
  
  The HexagonVectorCombine pass was moving an instruction
  incorrectly, which caused a use in a GEP that was not yet
  defined.
  HexagonVectorCombine removes a load from a group due to its
  dependences, but in realignGroup, the load is processed anyways.
  In realignGroup, when determining the maximum alignment, only
  those instructions still in the group should be considered.
  
  Create vector masks for scalar loads/stores.
  AlignVectors treats all loaded/stored values as vectors of bytes,
  and masks as corresponding vectors of booleans, so make getMask
  produce a 1-element vector for scalars from the start.
  
  Explicitly use integer types when rescaling a mask
  
  Handle opaque pointers in vector combine
  
  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.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109403/new/

https://reviews.llvm.org/D109403



More information about the llvm-commits mailing list