diff options
author | Timotej Kapus <tk1713@ic.ac.uk> | 2019-11-08 12:25:59 +0000 |
---|---|---|
committer | Cristian Cadar <c.cadar@imperial.ac.uk> | 2019-12-12 17:50:24 +0000 |
commit | b715ffa0c805f4d4813f0cda8b17eeb618e1ebf0 (patch) | |
tree | 90531bdb8339f2733a291d2e8a6465498cad1fa2 /lib/Expr | |
parent | 3f2f8aa30b35bb87fa7b7aa914233437b5d68cb2 (diff) | |
download | klee-b715ffa0c805f4d4813f0cda8b17eeb618e1ebf0.tar.gz |
[optimize-array] Fix hole index in buildMixedSelectExpr
buildMixedSelectExpr was using the byte index for holes in the select condition instead of the word based one. This only occured if there was more than 1 hole.
Diffstat (limited to 'lib/Expr')
-rw-r--r-- | lib/Expr/ArrayExprOptimizer.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Expr/ArrayExprOptimizer.cpp b/lib/Expr/ArrayExprOptimizer.cpp index 8ba0b40d..b55974d0 100644 --- a/lib/Expr/ArrayExprOptimizer.cpp +++ b/lib/Expr/ArrayExprOptimizer.cpp @@ -643,8 +643,7 @@ ref<Expr> ExprOptimizer::buildMixedSelectExpr( ref<Expr> temp_idx = MulExpr::create( ConstantExpr::create(holes[i], re->index->getWidth()), ConstantExpr::create(width / 8, re->index->getWidth())); - ref<Expr> cond = EqExpr::create( - re->index, ConstantExpr::create(holes[i], re->index->getWidth())); + ref<Expr> cond = EqExpr::create(re->index, temp_idx); ref<Expr> temp = SelectExpr::create( cond, extendRead(re->updates, temp_idx, width), result); result = temp; |