diff options
| author | Adam Nemet <anemet@apple.com> | 2017-11-28 17:26:28 +0000 |
|---|---|---|
| committer | Adam Nemet <anemet@apple.com> | 2017-11-28 17:26:28 +0000 |
| commit | 353f7cbc21eacbf857ef76310998e8cac54d19f3 (patch) | |
| tree | 7eaa3f20992dae885aa0231e85b841adeec5fa38 /llvm/test/tools/opt-viewer/Inputs/basic/or.h | |
| parent | 9d7bb0cb408e993181fc1b28986c7eb3495f28b9 (diff) | |
| download | bcm5719-llvm-353f7cbc21eacbf857ef76310998e8cac54d19f3.tar.gz bcm5719-llvm-353f7cbc21eacbf857ef76310998e8cac54d19f3.zip | |
Add opt-viewer testing
Detects whether we have the Python modules (pygments, yaml) required by
opt-viewer and hooks this up to REQUIRES.
This fixes https://bugs.llvm.org/show_bug.cgi?id=34129 (the lack of opt-viewer
testing).
It's also related to https://github.com/apple/swift/pull/12938 and the idea is
to expose LLVM_HAVE_OPT_VIEWER_MODULES to the Swift cmake.
Differential Revision: https://reviews.llvm.org/D40202
llvm-svn: 319188
Diffstat (limited to 'llvm/test/tools/opt-viewer/Inputs/basic/or.h')
| -rw-r--r-- | llvm/test/tools/opt-viewer/Inputs/basic/or.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/test/tools/opt-viewer/Inputs/basic/or.h b/llvm/test/tools/opt-viewer/Inputs/basic/or.h new file mode 100644 index 00000000000..a1c47edb3d1 --- /dev/null +++ b/llvm/test/tools/opt-viewer/Inputs/basic/or.h @@ -0,0 +1,16 @@ +void TestH(int *res, int *c, int *d, int *p, int n) { + int i; + +#pragma clang loop vectorize(assume_safety) + for (i = 0; i < 1600; i++) { + res[i] = (p[i] == 0) ? res[i] : res[i] + d[i]; + } + + for (i = 0; i < 16; i++) { + res[i] = (p[i] == 0) ? res[i] : res[i] + d[i]; + } + + foo(); + + foo(); bar(); foo(); +} |

