[clang] [CodeGen] Add TBAA struct path info for array members (PR #137719)
Ivan Kosarev via cfe-commits
cfe-commits at lists.llvm.org
Wed May 21 05:47:34 PDT 2025
================
@@ -28,25 +30,39 @@ int bar(C *c) {
int bar2(C *c) {
// CHECK-NEW-LABEL: _Z4bar2P1C
-// CHECK-NEW: load i32, {{.*}}, !tbaa [[TAG_int:!.*]]
+// CHECK-NEW: load i32, {{.*}}, !tbaa [[TAG_C_x:!.*]]
return c->x[2];
}
int bar3(C *c, int j) {
// CHECK-NEW-LABEL: _Z4bar3P1Ci
-// CHECK-NEW: load i32, {{.*}}, !tbaa [[TAG_int:!.*]]
+// CHECK-NEW: load i32, {{.*}}, !tbaa [[TAG_C_x]]
return c->x[j];
----------------
kosarev wrote:
Am I reading this right that the tag now says we access a 4-byte int in C at offset 4?
https://github.com/llvm/llvm-project/pull/137719
More information about the cfe-commits
mailing list