• Home
  • Raw
  • Download

Lines Matching +full:test +full:- +full:docs

16 ## Anatomy of a Test
18 Writing a test has two steps:
26 // CHECK-LABEL: test_add:
40 [LLVM's Filecheck](https://llvm.org/docs/CommandGuide/FileCheck.html)
41 is used to test the generated assembly against the `// CHECK` lines
50 bits of assembly. ([`CHECK-NEXT`](https://llvm.org/docs/CommandGuide/FileCheck.html#the-check-next-
53 * The tests are compiled with `-O3 -g0`. So we're only testing the
58 the test is run.
60 * The generated and stripped assembly file for a test is output under
61 `<build-directory>/test/<test-name>.s`
63 … supports using [`CHECK` prefixes](https://llvm.org/docs/CommandGuide/FileCheck.html#cmdoption-che…
65 The Benchmark tests use `CHECK-CLANG` and `CHECK-GNU` for lines that
67 `CHECK` lines match against all compilers. (Note: `CHECK-NOT` and
68 `CHECK-LABEL` are NOT prefixes. They are versions of non-prefixed
78 inherently non-portable. Different compilers and even different compiler
83 …g using regular expressions](https://llvm.org/docs/CommandGuide/FileCheck.html#filecheck-pattern-m…
84 …ing the creation of [named variables](https://llvm.org/docs/CommandGuide/FileCheck.html#filecheck-
85 … later matching, and [checking non-sequential matches](https://llvm.org/docs/CommandGuide/FileChec…
90 it in memory. To write a test that tolerates both cases we "capture"
92 to write the remainder of the test.
95 // CHECK-LABEL: test_div_no_op_into_shr:
114 <!-- {% raw %} -->
119 // CHECK-LABEL: test_store_point:
125 // CHECK: movl %eax, -{{[0-9]+}}(%rsp)
126 // CHECK: movl %eax, -{{[0-9]+}}(%rsp)
127 // CHECK: movl %eax, -{{[0-9]+}}(%rsp)
131 <!-- {% endraw %} -->
139 inherently non-portable. Currently the tests are limited to:
148 that modify code generation, including `--coverage` or `-fsanitize=`.