]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Add a folding rule for 1Sto16.
authorJulian Seward <jseward@acm.org>
Mon, 18 Jul 2005 13:58:49 +0000 (13:58 +0000)
committerJulian Seward <jseward@acm.org>
Mon, 18 Jul 2005 13:58:49 +0000 (13:58 +0000)
git-svn-id: svn://svn.valgrind.org/vex/trunk@1276

VEX/priv/ir/iropt.c

index 6e1bfc24b1e7d6327c1501880b142630db96621f..665c8ac08b084b9e47401d04463ebc401d816a53 100644 (file)
@@ -893,6 +893,11 @@ static IRExpr* fold_Expr ( IRExpr* e )
                     ? 1 : 0));
             break;
 
+         case Iop_1Sto16:
+            e2 = IRExpr_Const(IRConst_U16(
+                    e->Iex.Unop.arg->Iex.Const.con->Ico.U1
+                    ? 0xFFFF : 0));
+            break;
          case Iop_1Sto32:
             e2 = IRExpr_Const(IRConst_U32(
                     e->Iex.Unop.arg->Iex.Const.con->Ico.U1