[clang] [llvm] [Clang][IR] add TBAA metadata on pointer, union and array types. (PR #75177)

Bushev Dmitry via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 19 12:07:55 PST 2023


================
@@ -1,7 +1,7 @@
-// RUN: %clang_cc1 -triple x86_64-linux -std=c++98 %s -O3 -disable-llvm-passes -pedantic-errors -emit-llvm -o - | FileCheck %s
----------------
dybv-sc wrote:

Yes,

The matter is that if no llvm passes are run, IR is unoptimized and contains extra load and store instruction that operate with stack (storing and loading params there). Those extra loads should not be considered by the test, because it's goal to check tbaa for specific load and store coming from line 22 and 24. Before I introduced more precise metadata on pointer types, all of that load and stores had same metadata, so test passed even if wrong load was considered. Now, this test should pick only load coming from line 22. So, to make things easier, I just enabled optimization passes and final IR contains only one load and one store instruction. 

https://github.com/llvm/llvm-project/pull/75177


More information about the llvm-commits mailing list