aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2024-05-13 20:28:50 +0200
committervanhauser-thc <vh@thc.org>2024-05-13 20:28:50 +0200
commit0892a2245e9a7188e33c16444499c47942d1e56f (patch)
tree2ee1c3e70b0f6f3bfa99b8294502d9e9a2b0d04a
parent622474e9e45056c21abf4f8f39f2a6f7cc01053f (diff)
downloadafl++-0892a2245e9a7188e33c16444499c47942d1e56f.tar.gz
float laf check
-rw-r--r--instrumentation/split-compares-pass.so.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/instrumentation/split-compares-pass.so.cc b/instrumentation/split-compares-pass.so.cc
index 9b7bf256..effafe50 100644
--- a/instrumentation/split-compares-pass.so.cc
+++ b/instrumentation/split-compares-pass.so.cc
@@ -266,8 +266,11 @@ bool SplitComparesTransform::simplifyFPCompares(Module &M) {
/* this is probably not needed but we do it anyway */
if (TyOp0 != TyOp1) { continue; }
-
if (TyOp0->isArrayTy() || TyOp0->isVectorTy()) { continue; }
+ int constants = 0;
+ if (llvm::isa<llvm::Constant>(op0)) { ++constants; }
+ if (llvm::isa<llvm::Constant>(op1)) { ++constants; }
+ if (constants != 1) { continue; }
fcomps.push_back(selectcmpInst);