diff options
author | vanhauser-thc <vh@thc.org> | 2024-05-13 20:28:50 +0200 |
---|---|---|
committer | vanhauser-thc <vh@thc.org> | 2024-05-13 20:28:50 +0200 |
commit | 0892a2245e9a7188e33c16444499c47942d1e56f (patch) | |
tree | 2ee1c3e70b0f6f3bfa99b8294502d9e9a2b0d04a | |
parent | 622474e9e45056c21abf4f8f39f2a6f7cc01053f (diff) | |
download | afl++-0892a2245e9a7188e33c16444499c47942d1e56f.tar.gz |
float laf check
-rw-r--r-- | instrumentation/split-compares-pass.so.cc | 5 |
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); |