projects
/
c11tester.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8ad3c5f
)
Bug fix
author
weiyu
<weiyuluo1232@gmail.com>
Thu, 19 Dec 2019 00:05:37 +0000
(16:05 -0800)
committer
weiyu
<weiyuluo1232@gmail.com>
Thu, 19 Dec 2019 00:05:37 +0000
(16:05 -0800)
funcnode.cc
patch
|
blob
|
history
diff --git
a/funcnode.cc
b/funcnode.cc
index 26e8f59e84cb22a20f18576b29bd23c13c2011c9..49a3c01d5431d2a738fc51915b1a669f5db3f56e 100644
(file)
--- a/
funcnode.cc
+++ b/
funcnode.cc
@@
-554,10
+554,16
@@
SnapVector<struct half_pred_expr *> * half_pred_expressions)
bool FuncNode::amend_predicate_expr(Predicate * curr_pred, FuncInst * next_inst, ModelAction * next_act)
{
ModelVector<Predicate *> * children = curr_pred->get_children();
bool FuncNode::amend_predicate_expr(Predicate * curr_pred, FuncInst * next_inst, ModelAction * next_act)
{
ModelVector<Predicate *> * children = curr_pred->get_children();
- ASSERT(children->size() == 1);
- // there should only be only child
- Predicate * unset_pred = (*children)[0];
+ Predicate * unset_pred = NULL;
+ for (uint i = 0; i < children->size(); i++) {
+ Predicate * child = (*children)[i];
+ if (child->get_func_inst() == next_inst) {
+ unset_pred = child;
+ break;
+ }
+ }
+
uint64_t read_val = next_act->get_reads_from_value();
// only generate NULLITY predicate when it is actually NULL.
uint64_t read_val = next_act->get_reads_from_value();
// only generate NULLITY predicate when it is actually NULL.