[PATCH] D99851: [SROA][TBAA] Handle shift of regular TBAA nodes

Jeroen Dobbelaere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 9 03:28:55 PDT 2021


jeroen.dobbelaere added a comment.

In D99851#2678971 <https://reviews.llvm.org/D99851#2678971>, @aheejin wrote:

> @jeroen.dobbelaere Sorry not sure if I understand. Are you planning to review the code?

Yes, I have been doing this at the moment. Sorry for taking that long.

It indeed seems that D95826 <https://reviews.llvm.org/D95826> has been shifting this part of TBAA in the wrong direction. The change in this patch also does not trigger any test failures, so this is also not tested well.

I would like to see a decent fix, meaning that the offset is shifted in the other direction. The test example should also be extended to show the case where the shift should result in different tbaa types for the resulting stores.

Probably care must be taken when this is not about a member of a struct type: https://llvm.org/docs/LangRef.html#tbaa-metadata says that for basic types, the offset must always be 0.
An extra test where for example a i64 store (or load), representing a basic 'long' type or so, is split into two i32 stores (loads) would also be appreciated.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99851



More information about the llvm-commits mailing list