[all-commits] [llvm/llvm-project] 903c3d: [SCEVExpander] Always use i8 GEP for reused value ...

Nikita Popov via All-commits all-commits at lists.llvm.org
Wed Jan 26 06:39:33 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 903c3d2863b9d0ae760a2f45e0e934f1d12cd1d4
      https://github.com/llvm/llvm-project/commit/903c3d2863b9d0ae760a2f45e0e934f1d12cd1d4
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-01-26 (Wed, 26 Jan 2022)

  Changed paths:
    M llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp

  Log Message:
  -----------
  [SCEVExpander] Always use i8 GEP for reused value offset

We could keep the non-i8 GEP code for non-opaque pointers, but
there's two reasons I'm dropping it: First, this actually appears
to be dead code, at least it isn't hit in any of our tests. I
expect that this is because we usually expand trip counts, and
those are never pointers (anymore). Second, the non-i8 GEP was
actually incorrect in multiple ways, because it used SCEV type
sizes, which don't match DL type sizes (for pointers) and certainly
don't match type alloc sizes (which is what GEPs actually use).
As such, I'm simplifying the code to always use the i8 GEP code
path if it does get hit.




More information about the All-commits mailing list