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

John McCall via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 19 12:14:27 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
----------------
rjmccall wrote:

This is okay as long as you're sure the optimization will be performed and you make sure your test only checks the pattern you want out of the optimizer and doesn't cover other details that could potentially be changed by unrelated LLVM patches.  Otherwise, we generally aim to make IR-generation tests "unit" tests that specifically test the output of Clang's IR-generation.  For output that's only included in optimized modes, like TBAA metadata, that generally requires enabling optimization (with `-O<n>`) and then disabling all the LLVM optimizations (with `-disable-llvm-passes`).

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


More information about the cfe-commits mailing list