&& e->Iex.Const.con->Ico.U32 == 0);
}
-/* Is this literally IRExpr_Const(IRConst_U32(1---1)) ? */
-static Bool isOnesU32 ( IRExpr* e )
-{
- return toBool( e->tag == Iex_Const
- && e->Iex.Const.con->tag == Ico_U32
- && e->Iex.Const.con->Ico.U32 == 0xFFFFFFFF );
-}
-
/* Is this an integer constant with value 0 ? */
static Bool isZeroU ( IRExpr* e )
{
}
break;
+ case Iop_And64:
case Iop_And32:
- /* And32(x,0xFFFFFFFF) ==> x */
- if (isOnesU32(e->Iex.Binop.arg2)) {
+ /* And32/And64(x,1---1b) ==> x */
+ if (isOnesU(e->Iex.Binop.arg2)) {
e2 = e->Iex.Binop.arg1;
break;
}
- /* And32(x,0) ==> 0 */
- if (isZeroU32(e->Iex.Binop.arg2)) {
+ /* And32/And64(x,0) ==> 0 */
+ if (isZeroU(e->Iex.Binop.arg2)) {
e2 = e->Iex.Binop.arg2;
break;
}
- /* And32(0,x) ==> 0 */
- if (isZeroU32(e->Iex.Binop.arg1)) {
+ /* And32/And64(0,x) ==> 0 */
+ if (isZeroU(e->Iex.Binop.arg1)) {
e2 = e->Iex.Binop.arg1;
break;
}
- /* And32(t,t) ==> t, for some IRTemp t */
+ /* And32/And64(t,t) ==> t, for some IRTemp t */
if (sameIRExprs(env, e->Iex.Binop.arg1, e->Iex.Binop.arg2)) {
e2 = e->Iex.Binop.arg1;
break;
case Iop_And8:
case Iop_And16:
- case Iop_And64:
case Iop_AndV128:
case Iop_AndV256:
- /* And8/And16/And64/AndV128/AndV256(t,t)
+ /* And8/And16/AndV128/AndV256(t,t)
==> t, for some IRTemp t */
if (sameIRExprs(env, e->Iex.Binop.arg1, e->Iex.Binop.arg2)) {
e2 = e->Iex.Binop.arg1;