r274610 - Add negative test for TBAA
Roger Ferrer Ibanez via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 6 00:13:49 PDT 2016
Author: rogfer01
Date: Wed Jul 6 02:13:49 2016
New Revision: 274610
URL: http://llvm.org/viewvc/llvm-project?rev=274610&view=rev
Log:
Add negative test for TBAA
Revision r178818 added tests for TBAA but was missing negative tests to ensure
that TBAA markers are not emitted when TBAA is off.
Differential Revision: http://reviews.llvm.org/D21295
Modified:
cfe/trunk/test/CodeGen/tbaa.cpp
Modified: cfe/trunk/test/CodeGen/tbaa.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/tbaa.cpp?rev=274610&r1=274609&r2=274610&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/tbaa.cpp (original)
+++ cfe/trunk/test/CodeGen/tbaa.cpp Wed Jul 6 02:13:49 2016
@@ -1,6 +1,10 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin -O1 -no-struct-path-tbaa -disable-llvm-optzns %s -emit-llvm -o - | FileCheck %s
// RUN: %clang_cc1 -triple x86_64-apple-darwin -O1 -disable-llvm-optzns %s -emit-llvm -o - | FileCheck %s -check-prefix=PATH
+// RUN: %clang_cc1 -triple x86_64-apple-darwin -O0 -disable-llvm-optzns %s -emit-llvm -o - | FileCheck %s -check-prefix=NO-TBAA
+// RUN: %clang_cc1 -triple x86_64-apple-darwin -O1 -relaxed-aliasing -disable-llvm-optzns %s -emit-llvm -o - | FileCheck %s -check-prefix=NO-TBAA
// Test TBAA metadata generated by front-end.
+//
+// NO-TBAA-NOT: !tbaa
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
More information about the cfe-commits
mailing list