summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Fuzzer/FuzzerTracePC.cpp2
-rw-r--r--llvm/lib/Fuzzer/FuzzerValueBitMap.h2
-rw-r--r--llvm/lib/Fuzzer/test/AbsNegAndConstant64Test.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Fuzzer/FuzzerTracePC.cpp b/llvm/lib/Fuzzer/FuzzerTracePC.cpp
index ff1d494bafe..661ad23a8e3 100644
--- a/llvm/lib/Fuzzer/FuzzerTracePC.cpp
+++ b/llvm/lib/Fuzzer/FuzzerTracePC.cpp
@@ -273,7 +273,7 @@ ATTRIBUTE_TARGET_POPCNT ALWAYS_INLINE
ATTRIBUTE_NO_SANITIZE_ALL
void TracePC::HandleCmp(uintptr_t PC, T Arg1, T Arg2) {
uint64_t ArgXor = Arg1 ^ Arg2;
- uint64_t ArgDistance = __builtin_popcountl(ArgXor) + 1; // [1,65]
+ uint64_t ArgDistance = __builtin_popcountll(ArgXor) + 1; // [1,65]
uintptr_t Idx = ((PC & 4095) + 1) * ArgDistance;
if (sizeof(T) == 4)
TORC4.Insert(ArgXor, Arg1, Arg2);
diff --git a/llvm/lib/Fuzzer/FuzzerValueBitMap.h b/llvm/lib/Fuzzer/FuzzerValueBitMap.h
index 68dc3a9fc3a..600337ae407 100644
--- a/llvm/lib/Fuzzer/FuzzerValueBitMap.h
+++ b/llvm/lib/Fuzzer/FuzzerValueBitMap.h
@@ -68,7 +68,7 @@ struct ValueBitMap {
Other.Map[i] = 0;
}
if (M)
- Res += __builtin_popcountl(M);
+ Res += __builtin_popcountll(M);
}
NumBits = Res;
return OldNumBits < NumBits;
diff --git a/llvm/lib/Fuzzer/test/AbsNegAndConstant64Test.cpp b/llvm/lib/Fuzzer/test/AbsNegAndConstant64Test.cpp
index 577481431ae..69b0d59fb8e 100644
--- a/llvm/lib/Fuzzer/test/AbsNegAndConstant64Test.cpp
+++ b/llvm/lib/Fuzzer/test/AbsNegAndConstant64Test.cpp
@@ -14,7 +14,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
uint64_t y;
memcpy(&x, Data, sizeof(x));
memcpy(&y, Data + sizeof(x), sizeof(y));
- if (labs(x) < 0 && y == 0xbaddcafedeadbeefUL) {
+ if (llabs(x) < 0 && y == 0xbaddcafedeadbeefULL) {
printf("BINGO; Found the target, exiting; x = 0x%lx y 0x%lx\n", x, y);
exit(1);
}
OpenPOWER on IntegriCloud