aboutsummaryrefslogtreecommitdiff
path: root/instrumentation
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2022-07-07 11:10:12 +0200
committervanhauser-thc <vh@thc.org>2022-07-07 11:10:12 +0200
commit05080f32eeaf2cf357cd7ba4eff5743baf28237b (patch)
tree7dd1d8e4380f39cf1120e195a9a408b079915b69 /instrumentation
parent1759859ae2795ac5538b3a8e682d807d394c663e (diff)
downloadafl++-05080f32eeaf2cf357cd7ba4eff5743baf28237b.tar.gz
fixes
Diffstat (limited to 'instrumentation')
-rw-r--r--instrumentation/split-compares-pass.so.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/instrumentation/split-compares-pass.so.cc b/instrumentation/split-compares-pass.so.cc
index e069cabe..375de065 100644
--- a/instrumentation/split-compares-pass.so.cc
+++ b/instrumentation/split-compares-pass.so.cc
@@ -574,8 +574,9 @@ bool SplitComparesTransform::splitCompare(CmpInst *cmp_inst, Module &M,
case CmpInst::ICMP_SLE:
break;
default:
- fprintf(stderr, "Error: split-compare: Unsupported predicate (%u)\n",
- pred);
+ if (!be_quiet)
+ fprintf(stderr, "Error: split-compare: Unsupported predicate (%u)\n",
+ pred);
// unsupported predicate!
return false;
@@ -702,7 +703,8 @@ bool SplitComparesTransform::splitCompare(CmpInst *cmp_inst, Module &M,
CmpInst * icmp_inv_cmp = nullptr;
BasicBlock * inv_cmp_bb =
BasicBlock::Create(C, "inv_cmp", end_bb->getParent(), end_bb);
- if (pred == CmpInst::ICMP_UGT) {
+ if (pred == CmpInst::ICMP_UGT || pred == CmpInst::ICMP_SGT ||
+ pred == CmpInst::ICMP_UGE || pred == CmpInst::ICMP_SGE) {
icmp_inv_cmp = CmpInst::Create(Instruction::ICmp, CmpInst::ICMP_ULT,
op0_high, op1_high);
@@ -744,7 +746,8 @@ bool SplitComparesTransform::splitCompare(CmpInst *cmp_inst, Module &M,
}
default:
- fprintf(stderr, "Error: split-compare: should not happen\n");
+ if (!be_quiet)
+ fprintf(stderr, "Error: split-compare: should not happen\n");
return false;
}