diff options
author | hexcoder- <heiko@hexco.de> | 2020-07-07 12:59:00 +0200 |
---|---|---|
committer | hexcoder- <heiko@hexco.de> | 2020-07-07 12:59:00 +0200 |
commit | cbe029664e9e4d718119d8f1758c1bcc6c8dbfce (patch) | |
tree | 4481e9a7dc6db7f23396aab1b4d3a2ac3ba2c8e7 | |
parent | cade0214db905626ac0865e2107262d2c5577c88 (diff) | |
download | afl++-cbe029664e9e4d718119d8f1758c1bcc6c8dbfce.tar.gz |
fix issue #446
-rw-r--r-- | llvm_mode/split-compares-pass.so.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm_mode/split-compares-pass.so.cc b/llvm_mode/split-compares-pass.so.cc index 651fa5b4..82645224 100644 --- a/llvm_mode/split-compares-pass.so.cc +++ b/llvm_mode/split-compares-pass.so.cc @@ -640,7 +640,7 @@ size_t SplitComparesTransform::splitFPCompares(Module &M) { BranchInst::Create(end_bb, signequal_bb); - /* create a new bb which is executed if exponents are equal */ + /* create a new bb which is executed if exponents are satisfying the compare */ BasicBlock *middle_bb = BasicBlock::Create(C, "injected", end_bb->getParent(), end_bb); @@ -711,7 +711,7 @@ size_t SplitComparesTransform::splitFPCompares(Module &M) { case CmpInst::FCMP_UGT: Instruction *icmp_exponent; icmp_exponent = - CmpInst::Create(Instruction::ICmp, CmpInst::ICMP_UGT, m_e0, m_e1); + CmpInst::Create(Instruction::ICmp, CmpInst::ICMP_UGE, m_e0, m_e1); signequal_bb->getInstList().insert( BasicBlock::iterator(signequal_bb->getTerminator()), icmp_exponent); icmp_exponent_result = @@ -720,7 +720,7 @@ size_t SplitComparesTransform::splitFPCompares(Module &M) { case CmpInst::FCMP_OLT: case CmpInst::FCMP_ULT: icmp_exponent = - CmpInst::Create(Instruction::ICmp, CmpInst::ICMP_ULT, m_e0, m_e1); + CmpInst::Create(Instruction::ICmp, CmpInst::ICMP_ULE, m_e0, m_e1); signequal_bb->getInstList().insert( BasicBlock::iterator(signequal_bb->getTerminator()), icmp_exponent); icmp_exponent_result = @@ -738,7 +738,7 @@ size_t SplitComparesTransform::splitFPCompares(Module &M) { { auto term = signequal_bb->getTerminator(); - /* if the exponents are different do a fraction cmp */ + /* if the exponents are satifying the compare do a fraction cmp in middle_bb */ BranchInst::Create(middle_bb, end_bb, icmp_exponent_result, signequal_bb); term->eraseFromParent(); |