From 7de1f1a826a9f1848e09f7c312fb47f00f8d589e Mon Sep 17 00:00:00 2001 From: Kostya Serebryany Date: Fri, 31 Mar 2017 03:51:40 +0000 Subject: [libFuzzer] tests: don't test 64-bit comparison on 32-bit builds llvm-svn: 299179 --- llvm/lib/Fuzzer/test/SwapCmpTest.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'llvm/lib/Fuzzer/test/SwapCmpTest.cpp') diff --git a/llvm/lib/Fuzzer/test/SwapCmpTest.cpp b/llvm/lib/Fuzzer/test/SwapCmpTest.cpp index f79db4ccf71..b90ac72c22c 100644 --- a/llvm/lib/Fuzzer/test/SwapCmpTest.cpp +++ b/llvm/lib/Fuzzer/test/SwapCmpTest.cpp @@ -19,8 +19,9 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { x = __builtin_bswap64(x); y = __builtin_bswap32(y); z = __builtin_bswap16(z); + const bool k32bit = sizeof(void*) == 4; - if (x == 0x46555A5A5A5A5546ULL && + if ((k32bit || x == 0x46555A5A5A5A5546ULL) && z == 0x4F4B && y == 0x66757A7A && true -- cgit v1.2.3