Skip to content

Commit fd05fb4

Browse files
Hack to disable assertion hoisting for overflow-shl
1 parent 6108ad3 commit fd05fb4

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/ssa/ssa_unwinder.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Author: Peter Schrammel, Saurabh Joshi
77
\*******************************************************************/
88

99
// #define DEBUG
10+
#define COMPETITION
1011

1112
#include <util/prefix.h>
1213

@@ -472,7 +473,9 @@ void ssa_local_unwindert::add_assertions(loopt &loop, bool is_last)
472473
if(!is_last) // only add assumptions if we are not in %0 iteration
473474
{
474475
if(is_kinduction)
476+
{
475477
node.constraints.push_back(*a_it);
478+
}
476479
else if(is_bmc)
477480
{
478481
// only add in base case
@@ -663,7 +666,11 @@ void ssa_local_unwindert::add_hoisted_assertions(loopt &loop, bool is_last)
663666
it!=loop.assertion_hoisting_map.end(); ++it)
664667
{
665668
if(!is_last // only add assumptions if we are not in %0 iteration
666-
&& is_kinduction && !it->second.assertions.empty())
669+
&& is_kinduction && !it->second.assertions.empty()
670+
#ifdef COMPETITION
671+
&& !(it->first->guard.id()==ID_not &&
672+
it->first->guard.op0().id()==ID_overflow_shl))
673+
#endif
667674
{
668675
exprt e=disjunction(it->second.exit_conditions);
669676
SSA.rename(e, loop.body_nodes.begin()->location);

0 commit comments

Comments
 (0)