From f15380ba8ae35941dcd56d9a288ad023295dde30 Mon Sep 17 00:00:00 2001
From: Chris Lattner
Date: Sun, 20 Sep 2009 22:35:26 +0000
Subject: [PATCH] implement and document support for CHECK-NOT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82408 91177308-0d34-0410-b5e6-96231b3b80d8
---
docs/TestingGuide.html | 30 ++++++++++++++++++
test/Transforms/GVN/rle.ll | 21 +++++++++++++
utils/FileCheck/FileCheck.cpp | 58 ++++++++++++++++++++++++++++++-----
3 files changed, 101 insertions(+), 8 deletions(-)
diff --git a/docs/TestingGuide.html b/docs/TestingGuide.html
index f9743634e77..9e4a40ade8d 100644
--- a/docs/TestingGuide.html
+++ b/docs/TestingGuide.html
@@ -594,6 +594,36 @@ directive in a file.
+
+
+
+
The CHECK-NOT: directive is used to verify that a string doesn't occur
+between two matches (or the first matches and the beginning of the file). For
+example, to verify that a load is removed by a transformation, a test like this
+can be used:
+
+
+
+define i8 @coerce_offset0(i32 %V, i32* %P) {
+ store i32 %V, i32* %P
+
+ %P2 = bitcast i32* %P to i8*
+ %P3 = getelementptr i8* %P2, i32 2
+
+ %A = load i8* %P3
+ ret i8 %A
+; CHECK: @coerce_offset0
+; CHECK-NOT: load
+; CHECK: ret i8
+}
+
+
+
+
+