]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Add a simple folding rule for Iop_ZeroHI64ofV128.
authorJulian Seward <jseward@acm.org>
Thu, 14 Aug 2014 22:25:31 +0000 (22:25 +0000)
committerJulian Seward <jseward@acm.org>
Thu, 14 Aug 2014 22:25:31 +0000 (22:25 +0000)
git-svn-id: svn://svn.valgrind.org/vex/trunk@2921

VEX/priv/ir_opt.c

index 95bdb28ef1791f359d1cb7d0f11aab27536680ee..817f270374fce374cb3e62682c229e50786662f5 100644 (file)
@@ -1657,6 +1657,18 @@ static IRExpr* fold_Expr ( IRExpr** env, IRExpr* e )
             break;
          }
 
+         case Iop_ZeroHI64ofV128: {
+            /* Could do better here -- only need to look at the bottom 64 bits
+               of the argument, really. */
+            UShort v128 = e->Iex.Unop.arg->Iex.Const.con->Ico.V128;
+            if (v128 == 0x0000) {
+               e2 = IRExpr_Const(IRConst_V128(0x0000));
+            } else {
+               goto unhandled;
+            }
+            break;
+         }
+
          default: 
             goto unhandled;
       }