]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fold 1Uto32.
authorJulian Seward <jseward@acm.org>
Sat, 9 Oct 2004 00:58:19 +0000 (00:58 +0000)
committerJulian Seward <jseward@acm.org>
Sat, 9 Oct 2004 00:58:19 +0000 (00:58 +0000)
git-svn-id: svn://svn.valgrind.org/vex/trunk@311

VEX/priv/ir/iropt.c

index 2b175994fdc7c307dfe16c7a1909ca7a0b749bb1..e74bb23ef4441d06a72152ec3dab48208389c1bf 100644 (file)
@@ -345,6 +345,11 @@ static IRExpr* fold_Expr ( IRExpr* e )
    if (e->tag == Iex_Unop
        && e->Iex.Unop.arg->tag == Iex_Const) {
       switch (e->Iex.Unop.op) {
+         case Iop_1Uto32:
+            e2 = IRExpr_Const(IRConst_U32(
+                    e->Iex.Unop.arg->Iex.Const.con->Ico.Bit
+                    ? 1 : 0));
+            break;
          case Iop_8Sto32: {
             /* signed */ Int s32 = e->Iex.Unop.arg->Iex.Const.con->Ico.U8;
             s32 <<= 24;