about summary refs log tree commit diff homepage
path: root/lib
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-06-08 05:53:15 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-06-08 05:53:15 +0000
commitff4e0374e27e43fa897f99726d33ab61e8bd2627 (patch)
treeafa730b512de53623fe1c838a21de087bd39247b /lib
parentd9d05fd0025138383555d5efc69bf461d513b8d8 (diff)
downloadklee-ff4e0374e27e43fa897f99726d33ab61e8bd2627.tar.gz
Kill off Concat::is[248]ByteConcat, and fix FastCexSolver for this case.
git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@73049 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Solver/FastCexSolver.cpp25
1 files changed, 4 insertions, 21 deletions
diff --git a/lib/Solver/FastCexSolver.cpp b/lib/Solver/FastCexSolver.cpp
index 1efeb0cb..882e0f28 100644
--- a/lib/Solver/FastCexSolver.cpp
+++ b/lib/Solver/FastCexSolver.cpp
@@ -504,27 +504,10 @@ public:
       // value, isolating for that range, and continuing.
     case Expr::Concat: {
       ConcatExpr *ce = cast<ConcatExpr>(e);
-      if (ce->is2ByteConcat()) {
-	forceExprToRange(ce->getKid(0), range.extract( 8, 16));
-	forceExprToRange(ce->getKid(1), range.extract( 0,  8));
-      }
-      else if (ce->is4ByteConcat()) {
-	forceExprToRange(ce->getKid(0), range.extract(24, 32));
-	forceExprToRange(ce->getKid(1), range.extract(16, 24));
-	forceExprToRange(ce->getKid(2), range.extract( 8, 16));
-	forceExprToRange(ce->getKid(3), range.extract( 0,  8));
-      }
-      else if (ce->is8ByteConcat()) {
-	forceExprToRange(ce->getKid(0), range.extract(56, 64));
-	forceExprToRange(ce->getKid(1), range.extract(48, 56));
-	forceExprToRange(ce->getKid(2), range.extract(40, 48));
-	forceExprToRange(ce->getKid(3), range.extract(32, 40));
-	forceExprToRange(ce->getKid(4), range.extract(24, 32));
-	forceExprToRange(ce->getKid(5), range.extract(16, 24));
-	forceExprToRange(ce->getKid(6), range.extract( 8, 16));
-	forceExprToRange(ce->getKid(7), range.extract( 0,  8));
-      }
-      
+      Expr::Width LSBWidth = ce->getKid(1)->getWidth();
+      Expr::Width MSBWidth = ce->getKid(1)->getWidth();
+      forceExprToRange(ce->getKid(0), range.extract(LSBWidth, MSBWidth));
+      forceExprToRange(ce->getKid(1), range.extract(0, LSBWidth));
       break;
     }