[clang] [llvm] [clang][CodeGen][AA] Introduce `!llvm.errno.tbaa` for errno alias disambiguation (PR #125258)
John McCall via cfe-commits
cfe-commits at lists.llvm.org
Thu May 29 11:18:59 PDT 2025
================
@@ -32,9 +32,9 @@ struct X f(void);
// C11-O2-NEXT: [[A:%.*]] = getelementptr inbounds nuw [[STRUCT_X]], ptr [[REF_TMP]], i32 0, i32 0
// C11-O2-NEXT: [[ARRAYDECAY:%.*]] = getelementptr inbounds [5 x i32], ptr [[A]], i64 0, i64 0
// C11-O2-NEXT: call void @llvm.lifetime.end.p0(i64 20, ptr [[REF_TMP]]) #[[ATTR5]]
-// C11-O2-NEXT: store ptr [[ARRAYDECAY]], ptr [[P]], align 8, !tbaa [[TBAA2:![0-9]+]]
-// C11-O2-NEXT: [[TMP0:%.*]] = load ptr, ptr [[P]], align 8, !tbaa [[TBAA2]]
-// C11-O2-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4, !tbaa [[TBAA7:![0-9]+]]
+// C11-O2-NEXT: store ptr [[ARRAYDECAY]], ptr [[P]], align 8, !tbaa [[TBAA6:![0-9]+]]
+// C11-O2-NEXT: [[TMP0:%.*]] = load ptr, ptr [[P]], align 8, !tbaa [[TBAA6]]
+// C11-O2-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4, !tbaa [[TBAA2:![0-9]+]]
----------------
rjmccall wrote:
Since you're renaming these anyway, could you rename them to something semantic like `INTPTR_TBAA` and `INT_TBAA`? The number doesn't really mean anything to test readers, and when there are TBAA changes in the future, we want to just be able to change where `INTPTR_TBAA` is matched in the metadata section rather than having to renumber all the variables in the tests every time.
(Same for the other tests)
https://github.com/llvm/llvm-project/pull/125258
More information about the cfe-commits
mailing list