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

Jeroen Dobbelaere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 12 00:24:08 PDT 2021


jeroen.dobbelaere added inline comments.


================
Comment at: llvm/test/Transforms/SROA/tbaa-subload.ll:35
+!7 = !{!8, !3, i64 8}
+!8 = !{!"_ZTSZN2ax2baEMS_FvvE2an2arE3$_0", !9, i64 0, !3, i64 8}
+!9 = !{!"_ZTS2ar"}
----------------
@aheejin The issue I see is, that if !8 would be something like :

  !8 = !{!"_ZTSZN2ax2baEMS_FvvE2an2arE3$_0", !9, i64 0, !10, i64 8, !11, i64 16}
  !10 = !{!"long", !3, i64 0 }
  !11 = !{!"int", !3, i64 0 }

The resulting tbaa will still be incorrect after this patch: the two stores should be referring to two different items, with different offsets.
aka, the resulting `!0 = !{!1, !4, i64 8}` is only valid for the first store. The second store should be something like '`!99 = !{!1, !4, i64 16 }`




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