implement and document support for CHECK-NOT

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82408 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2009-09-20 22:35:26 +00:00
parent 96077036f0
commit f15380ba8a
3 changed files with 101 additions and 8 deletions
+30
View File
@@ -594,6 +594,36 @@ directive in a file.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection"><a
name="FileCheck-CHECK-NOT">The "CHECK-NOT:" directive</a></div>
<div class="doc_text">
<p>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:</p>
<div class="doc_code">
<pre>
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
; <b>CHECK:</b> @coerce_offset0
; <b>CHECK-NOT:</b> load
; <b>CHECK:</b> ret i8
}
</pre>
</div>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsection"><a name="dgvars">Variables and
substitutions</a></div>