Skip to content

Commit

Permalink
Hack to disable assertion hoisting for overflow-shl
Browse files Browse the repository at this point in the history
  • Loading branch information
peterschrammel committed Nov 26, 2017
1 parent 6108ad3 commit fd05fb4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/ssa/ssa_unwinder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Author: Peter Schrammel, Saurabh Joshi
\*******************************************************************/

// #define DEBUG
#define COMPETITION

#include <util/prefix.h>

Expand Down Expand Up @@ -472,7 +473,9 @@ void ssa_local_unwindert::add_assertions(loopt &loop, bool is_last)
if(!is_last) // only add assumptions if we are not in %0 iteration
{
if(is_kinduction)
{
node.constraints.push_back(*a_it);
}
else if(is_bmc)
{
// only add in base case
Expand Down Expand Up @@ -663,7 +666,11 @@ void ssa_local_unwindert::add_hoisted_assertions(loopt &loop, bool is_last)
it!=loop.assertion_hoisting_map.end(); ++it)
{
if(!is_last // only add assumptions if we are not in %0 iteration
&& is_kinduction && !it->second.assertions.empty())
&& is_kinduction && !it->second.assertions.empty()
#ifdef COMPETITION
&& !(it->first->guard.id()==ID_not &&
it->first->guard.op0().id()==ID_overflow_shl))
#endif
{
exprt e=disjunction(it->second.exit_conditions);
SSA.rename(e, loop.body_nodes.begin()->location);
Expand Down

0 comments on commit fd05fb4

Please sign in to comment.