[PATCH] D149654: [SLP][RISCV] Account for offset folding in getPointersChainCost

Luke Lau via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 19 08:01:45 PDT 2023


luke added a comment.

In D149654#4356406 <https://reviews.llvm.org/D149654#4356406>, @reames wrote:

> This does raise the point that considering a constant offset GEP as zero cost is actually wrong.  If the offsets are 0, and UINT_MAX, that's not a zero cost GEP on RISCV.

I guess with cost modelling there's not a strict definition of "wrong", but whether it could be more accurate. Whilst working on this locally I changed that assumption to check if it's foldable, but intentionally left it out to simplify things. It seems like an edge case where the approximation gets it right most of the time.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149654



More information about the llvm-commits mailing list