diff options
Diffstat (limited to 'docs/TestingGuide.html')
-rw-r--r-- | docs/TestingGuide.html | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/docs/TestingGuide.html b/docs/TestingGuide.html index f9743634e7..9e4a40ade8 100644 --- a/docs/TestingGuide.html +++ b/docs/TestingGuide.html @@ -595,6 +595,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> <!-- _______________________________________________________________________ --> |