summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Fuzzer/test/SwapCmpTest.cpp
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2016-10-25 02:04:43 +0000
committerKostya Serebryany <kcc@google.com>2016-10-25 02:04:43 +0000
commit3364f907836d50482f77c7def3952b09e99caa97 (patch)
tree9891c2d477c59f4a0baeb65b8066650d183b060c /llvm/lib/Fuzzer/test/SwapCmpTest.cpp
parent7695cb6da8021ef610ffbcf3b296a16688c7930d (diff)
downloadbcm5719-llvm-3364f907836d50482f77c7def3952b09e99caa97.tar.gz
bcm5719-llvm-3364f907836d50482f77c7def3952b09e99caa97.zip
[libFuzzer] simplify the code for use_cmp, also use the position hint when available, add a test
llvm-svn: 285049
Diffstat (limited to 'llvm/lib/Fuzzer/test/SwapCmpTest.cpp')
-rw-r--r--llvm/lib/Fuzzer/test/SwapCmpTest.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Fuzzer/test/SwapCmpTest.cpp b/llvm/lib/Fuzzer/test/SwapCmpTest.cpp
index 3c1199e72fb..f79db4ccf71 100644
--- a/llvm/lib/Fuzzer/test/SwapCmpTest.cpp
+++ b/llvm/lib/Fuzzer/test/SwapCmpTest.cpp
@@ -21,8 +21,9 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
z = __builtin_bswap16(z);
if (x == 0x46555A5A5A5A5546ULL &&
+ z == 0x4F4B &&
y == 0x66757A7A &&
- z == 0x4F4B
+ true
) {
if (Data[Size - 3] == 'z') {
fprintf(stderr, "BINGO; Found the target\n");
OpenPOWER on IntegriCloud