[PATCH] D138708: [SROA] Assert the AllocSize of i8 to be 1

Jannik Silvanus via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 25 06:55:58 PST 2022


jsilvanus added a comment.

In these places, we try to obtain a pointer basd on a base pointer and a byte offset, and do so using a GEP on `i8`, using the offset as index.
This will fail if the AllocSize of `i8` is not 1. The added assertions detect such cases instead of generating wrong code.

I can't comment on whether the existing behavior is correct, that is, whether overaligned `i8` should be supported.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D138708



More information about the llvm-commits mailing list