Lines Matching refs:Iex
274 return toBool( isIRAtom(e->Iex.Binop.arg1)
275 && isIRAtom(e->Iex.Binop.arg2) );
277 return isIRAtom(e->Iex.Load.addr);
297 IRExpr_GetI(ex->Iex.GetI.descr,
298 flatten_Expr(bb, ex->Iex.GetI.ix),
299 ex->Iex.GetI.bias)));
309 IRQop* qop = ex->Iex.Qop.details;
321 IRTriop* triop = ex->Iex.Triop.details;
334 IRExpr_Binop(ex->Iex.Binop.op,
335 flatten_Expr(bb, ex->Iex.Binop.arg1),
336 flatten_Expr(bb, ex->Iex.Binop.arg2))));
342 IRExpr_Unop(ex->Iex.Unop.op,
343 flatten_Expr(bb, ex->Iex.Unop.arg))));
349 IRExpr_Load(ex->Iex.Load.end,
350 ex->Iex.Load.ty,
351 flatten_Expr(bb, ex->Iex.Load.addr))));
355 newargs = shallowCopyIRExprVec(ex->Iex.CCall.args);
360 IRExpr_CCall(ex->Iex.CCall.cee,
361 ex->Iex.CCall.retty,
368 IRExpr_ITE(flatten_Expr(bb, ex->Iex.ITE.cond),
369 flatten_Expr(bb, ex->Iex.ITE.iftrue),
370 flatten_Expr(bb, ex->Iex.ITE.iffalse))));
376 if (ex->Iex.Const.con->tag == Ico_F64i) {
379 IRExpr_Const(ex->Iex.Const.con)));
633 key = (HWord)mk_key_GetPut( get->Iex.Get.offset,
634 get->Iex.Get.ty );
644 == st->Ist.WrTmp.data->Iex.Get.ty );
737 key = mk_key_GetPut ( e->Iex.Get.offset, e->Iex.Get.ty );
741 key = mk_key_GetIPutI ( e->Iex.GetI.descr );
1054 if (e1->Iex.RdTmp.tmp == e2->Iex.RdTmp.tmp) return True;
1056 if (env[e1->Iex.RdTmp.tmp] && env[e2->Iex.RdTmp.tmp]) {
1057 Bool same = sameIRExprs_aux(env, env[e1->Iex.RdTmp.tmp],
1058 env[e2->Iex.RdTmp.tmp]);
1074 return toBool( e1->Iex.Binop.op == e2->Iex.Binop.op
1075 && sameIRExprs_aux( env, e1->Iex.Binop.arg1,
1076 e2->Iex.Binop.arg1 )
1077 && sameIRExprs_aux( env, e1->Iex.Binop.arg2,
1078 e2->Iex.Binop.arg2 ));
1081 return toBool( e1->Iex.Unop.op == e2->Iex.Unop.op
1082 && sameIRExprs_aux( env, e1->Iex.Unop.arg,
1083 e2->Iex.Unop.arg ));
1086 IRConst *c1 = e1->Iex.Const.con;
1087 IRConst *c2 = e2->Iex.Const.con;
1101 IRTriop *tri1 = e1->Iex.Triop.details;
1102 IRTriop *tri2 = e2->Iex.Triop.details;
1110 return toBool( sameIRExprs_aux( env, e1->Iex.ITE.cond,
1111 e2->Iex.ITE.cond )
1112 && sameIRExprs_aux( env, e1->Iex.ITE.iftrue,
1113 e2->Iex.ITE.iftrue )
1114 && sameIRExprs_aux( env, e1->Iex.ITE.iffalse,
1115 e2->Iex.ITE.iffalse ));
1162 IRConst *c1 = e1->Iex.Const.con;
1163 IRConst *c2 = e2->Iex.Const.con;
1177 && e->Iex.Const.con->tag == Ico_U32
1178 && e->Iex.Const.con->Ico.U32 == 0);
1185 && e->Iex.Const.con->tag == Ico_U64
1186 && e->Iex.Const.con->Ico.U64 == 0);
1193 && e->Iex.Const.con->tag == Ico_V128
1194 && e->Iex.Const.con->Ico.V128 == 0x0000);
1201 && e->Iex.Const.con->tag == Ico_V256
1202 && e->Iex.Const.con->Ico.V256 == 0x00000000);
1209 switch (e->Iex.Const.con->tag) {
1210 case Ico_U1: return toBool( e->Iex.Const.con->Ico.U1 == 0);
1211 case Ico_U8: return toBool( e->Iex.Const.con->Ico.U8 == 0);
1212 case Ico_U16: return toBool( e->Iex.Const.con->Ico.U16 == 0);
1213 case Ico_U32: return toBool( e->Iex.Const.con->Ico.U32 == 0);
1214 case Ico_U64: return toBool( e->Iex.Const.con->Ico.U64 == 0);
1223 switch (e->Iex.Const.con->tag) {
1224 case Ico_U8: return toBool( e->Iex.Const.con->Ico.U8 == 0xFF);
1225 case Ico_U16: return toBool( e->Iex.Const.con->Ico.U16 == 0xFFFF);
1226 case Ico_U32: return toBool( e->Iex.Const.con->Ico.U32
1228 case Ico_U64: return toBool( e->Iex.Const.con->Ico.U64
1342 e = env[(Int)e->Iex.RdTmp.tmp];
1356 if (e->Iex.Unop.arg->tag == Iex_Const) {
1357 switch (e->Iex.Unop.op) {
1360 e->Iex.Unop.arg->Iex.Const.con->Ico.U1
1365 e->Iex.Unop.arg->Iex.Const.con->Ico.U1
1370 e->Iex.Unop.arg->Iex.Const.con->Ico.U1
1376 e->Iex.Unop.arg->Iex.Const.con->Ico.U1
1381 e->Iex.Unop.arg->Iex.Const.con->Ico.U1
1386 e->Iex.Unop.arg->Iex.Const.con->Ico.U1
1391 e->Iex.Unop.arg->Iex.Const.con->Ico.U1
1396 /* signed */ Int s32 = e->Iex.Unop.arg->Iex.Const.con->Ico.U8;
1403 /* signed */ Int s32 = e->Iex.Unop.arg->Iex.Const.con->Ico.U16;
1411 0xFFULL & e->Iex.Unop.arg->Iex.Const.con->Ico.U8));
1415 0xFFFFULL & e->Iex.Unop.arg->Iex.Const.con->Ico.U16));
1419 0xFF & e->Iex.Unop.arg->Iex.Const.con->Ico.U8));
1422 /* signed */ Short s16 = e->Iex.Unop.arg->Iex.Const.con->Ico.U8;
1430 0xFF & e->Iex.Unop.arg->Iex.Const.con->Ico.U8));
1434 0xFFFF & e->Iex.Unop.arg->Iex.Const.con->Ico.U16));
1438 0xFFFF & e->Iex.Unop.arg->Iex.Const.con->Ico.U32)));
1442 0xFF & e->Iex.Unop.arg->Iex.Const.con->Ico.U32)));
1446 1 == (1 & e->Iex.Unop.arg->Iex.Const.con->Ico.U32)
1451 1 == (1 & e->Iex.Unop.arg->Iex.Const.con->Ico.U64)
1457 ~ (e->Iex.Unop.arg->Iex.Const.con->Ico.V128)));
1461 ~ (e->Iex.Unop.arg->Iex.Const.con->Ico.U64)));
1465 ~ (e->Iex.Unop.arg->Iex.Const.con->Ico.U32)));
1469 ~ (e->Iex.Unop.arg->Iex.Const.con->Ico.U16))));
1473 ~ (e->Iex.Unop.arg->Iex.Const.con->Ico.U8))));
1478 notBool(e->Iex.Unop.arg->Iex.Const.con->Ico.U1)));
1482 ULong w64 = e->Iex.Unop.arg->Iex.Const.con->Ico.U64;
1488 ULong w64 = e->Iex.Unop.arg->Iex.Const.con->Ico.U64;
1494 ULong w64 = e->Iex.Unop.arg->Iex.Const.con->Ico.U64;
1500 ULong w64 = e->Iex.Unop.arg->Iex.Const.con->Ico.U64;
1508 & e->Iex.Unop.arg->Iex.Const.con->Ico.U32));
1511 /* signed */ Long s64 = e->Iex.Unop.arg->Iex.Const.con->Ico.U16;
1518 /* signed */ Long s64 = e->Iex.Unop.arg->Iex.Const.con->Ico.U32;
1526 UShort w16 = e->Iex.Unop.arg->Iex.Const.con->Ico.U16;
1532 UShort w16 = e->Iex.Unop.arg->Iex.Const.con->Ico.U16;
1542 (0xFF & e->Iex.Unop.arg->Iex.Const.con->Ico.U8)
1548 (0xFFFFFFFF & e->Iex.Unop.arg->Iex.Const.con->Ico.U32)
1553 0ULL != e->Iex.Unop.arg->Iex.Const.con->Ico.U64
1558 UInt w32 = e->Iex.Unop.arg->Iex.Const.con->Ico.U32;
1566 ULong w64 = e->Iex.Unop.arg->Iex.Const.con->Ico.U64;
1575 UInt u32 = e->Iex.Unop.arg->Iex.Const.con->Ico.U32;
1583 ULong u64 = e->Iex.Unop.arg->Iex.Const.con->Ico.U64;
1591 UInt u32 = e->Iex.Unop.arg->Iex.Const.con->Ico.U32;
1597 ULong u64 = e->Iex.Unop.arg->Iex.Const.con->Ico.U64;
1608 UInt u32 = e->Iex.Unop.arg->Iex.Const.con->Ico.U32;
1617 UShort v128 = e->Iex.Unop.arg->Iex.Const.con->Ico.V128;
1626 UShort v128 = e->Iex.Unop.arg->Iex.Const.con->Ico.V128;
1635 ULong u64 = e->Iex.Unop.arg->Iex.Const.con->Ico.U64;
1647 UInt v256 = e->Iex.Unop.arg->Iex.Const.con->Ico.V256;
1664 if (e->Iex.Binop.arg1->tag == Iex_Const
1665 && e->Iex.Binop.arg2->tag == Iex_Const) {
1667 switch (e->Iex.Binop.op) {
1672 (e->Iex.Binop.arg1->Iex.Const.con->Ico.U8
1673 | e->Iex.Binop.arg2->Iex.Const.con->Ico.U8))));
1677 (e->Iex.Binop.arg1->Iex.Const.con->Ico.U16
1678 | e->Iex.Binop.arg2->Iex.Const.con->Ico.U16))));
1682 (e->Iex.Binop.arg1->Iex.Const.con->Ico.U32
1683 | e->Iex.Binop.arg2->Iex.Const.con->Ico.U32)));
1687 (e->Iex.Binop.arg1->Iex.Const.con->Ico.U64
1688 | e->Iex.Binop.arg2->Iex.Const.con->Ico.U64)));
1692 (e->Iex.Binop.arg1->Iex.Const.con->Ico.V128
1693 | e->Iex.Binop.arg2->Iex.Const.con->Ico.V128)));
1699 (e->Iex.Binop.arg1->Iex.Const.con->Ico.U8
1700 ^ e->Iex.Binop.arg2->Iex.Const.con->Ico.U8))));
1704 (e->Iex.Binop.arg1->Iex.Const.con->Ico.U16
1705 ^ e->Iex.Binop.arg2->Iex.Const.con->Ico.U16))));
1709 (e->Iex.Binop.arg1->Iex.Const.con->Ico.U32
1710 ^ e->Iex.Binop.arg2->Iex.Const.con->Ico.U32)));
1714 (e->Iex.Binop.arg1->Iex.Const.con->Ico.U64
1715 ^ e->Iex.Binop.arg2->Iex.Const.con->Ico.U64)));
1719 (e->Iex.Binop.arg1->Iex.Const.con->Ico.V128
1720 ^ e->Iex.Binop.arg2->Iex.Const.con->Ico.V128)));
1726 (e->Iex.Binop.arg1->Iex.Const.con->Ico.U8
1727 & e->Iex.Binop.arg2->Iex.Const.con->Ico.U8))));
1731 (e->Iex.Binop.arg1->Iex.Const.con->Ico.U16
1732 & e->Iex.Binop.arg2->Iex.Const.con->Ico.U16))));
1736 (e->Iex.Binop.arg1->Iex.Const.con->Ico.U32
1737 & e->Iex.Binop.arg2->Iex.Const.con->Ico.U32)));
1741 (e->Iex.Binop.arg1->Iex.Const.con->Ico.U64
1742 & e->Iex.Binop.arg2->Iex.Const.con->Ico.U64)));
1746 (e->Iex.Binop.arg1->Iex.Const.con->Ico.V128
1747 & e->Iex.Binop.arg2->Iex.Const.con->Ico.V128)));
1753 (e->Iex.Binop.arg1->Iex.Const.con->Ico.U8
1754 + e->Iex.Binop.arg2->Iex.Const.con->Ico.U8))));
1758 (e->Iex.Binop.arg1->Iex.Const.con->Ico.U32
1759 + e->Iex.Binop.arg2->Iex.Const.con->Ico.U32)));
1763 (e->Iex.Binop.arg1->Iex.Const.con->Ico.U64
1764 + e->Iex.Binop.arg2->Iex.Const.con->Ico.U64)));
1770 (e->Iex.Binop.arg1->Iex.Const.con->Ico.U8
1771 - e->Iex.Binop.arg2->Iex.Const.con->Ico.U8))));
1775 (e->Iex.Binop.arg1->Iex.Const.con->Ico.U32
1776 - e->Iex.Binop.arg2->Iex.Const.con->Ico.U32)));
1780 (e->Iex.Binop.arg1->Iex.Const.con->Ico.U64
1781 - e->Iex.Binop.arg2->Iex.Const.con->Ico.U64)));
1786 UInt u32a = e->Iex.Binop.arg1->Iex.Const.con->Ico.U32;
1787 UInt u32b = e->Iex.Binop.arg2->Iex.Const.con->Ico.U32;
1796 (e->Iex.Binop.arg1->Iex.Const.con->Ico.U32
1797 * e->Iex.Binop.arg2->Iex.Const.con->Ico.U32)));
1801 (e->Iex.Binop.arg1->Iex.Const.con->Ico.U64
1802 * e->Iex.Binop.arg2->Iex.Const.con->Ico.U64)));
1807 UInt u32a = e->Iex.Binop.arg1->Iex.Const.con->Ico.U32;
1808 UInt u32b = e->Iex.Binop.arg2->Iex.Const.con->Ico.U32;
1821 vassert(e->Iex.Binop.arg2->Iex.Const.con->tag == Ico_U8);
1822 shift = (Int)(e->Iex.Binop.arg2->Iex.Const.con->Ico.U8);
1825 (e->Iex.Binop.arg1->Iex.Const.con->Ico.U32
1829 vassert(e->Iex.Binop.arg2->Iex.Const.con->tag == Ico_U8);
1830 shift = (Int)(e->Iex.Binop.arg2->Iex.Const.con->Ico.U8);
1833 (e->Iex.Binop.arg1->Iex.Const.con->Ico.U64
1841 vassert(e->Iex.Binop.arg2->Iex.Const.con->tag == Ico_U8);
1842 s32 = (Int)(e->Iex.Binop.arg1->Iex.Const.con->Ico.U32);
1843 shift = (Int)(e->Iex.Binop.arg2->Iex.Const.con->Ico.U8);
1853 vassert(e->Iex.Binop.arg2->Iex.Const.con->tag == Ico_U8);
1854 s64 = (Long)(e->Iex.Binop.arg1->Iex.Const.con->Ico.U64);
1855 shift = (Int)(e->Iex.Binop.arg2->Iex.Const.con->Ico.U8);
1867 vassert(e->Iex.Binop.arg2->Iex.Const.con->tag == Ico_U8);
1868 u32 = (UInt)(e->Iex.Binop.arg1->Iex.Const.con->Ico.U32);
1869 shift = (Int)(e->Iex.Binop.arg2->Iex.Const.con->Ico.U8);
1879 vassert(e->Iex.Binop.arg2->Iex.Const.con->tag == Ico_U8);
1880 u64 = (ULong)(e->Iex.Binop.arg1->Iex.Const.con->Ico.U64);
1881 shift = (Int)(e->Iex.Binop.arg2->Iex.Const.con->Ico.U8);
1892 (e->Iex.Binop.arg1->Iex.Const.con->Ico.U32
1893 == e->Iex.Binop.arg2->Iex.Const.con->Ico.U32))));
1897 (e->Iex.Binop.arg1->Iex.Const.con->Ico.U64
1898 == e->Iex.Binop.arg2->Iex.Const.con->Ico.U64))));
1906 ((0xFF & e->Iex.Binop.arg1->Iex.Const.con->Ico.U8)
1907 != (0xFF & e->Iex.Binop.arg2->Iex.Const.con->Ico.U8)))));
1913 (e->Iex.Binop.arg1->Iex.Const.con->Ico.U32
1914 != e->Iex.Binop.arg2->Iex.Const.con->Ico.U32))));
1920 (e->Iex.Binop.arg1->Iex.Const.con->Ico.U64
1921 != e->Iex.Binop.arg2->Iex.Const.con->Ico.U64))));
1927 ((UInt)(e->Iex.Binop.arg1->Iex.Const.con->Ico.U32)
1928 <= (UInt)(e->Iex.Binop.arg2->Iex.Const.con->Ico.U32)))));
1932 ((ULong)(e->Iex.Binop.arg1->Iex.Const.con->Ico.U64)
1933 <= (ULong)(e->Iex.Binop.arg2->Iex.Const.con->Ico.U64)))));
1939 ((Int)(e->Iex.Binop.arg1->Iex.Const.con->Ico.U32)
1940 <= (Int)(e->Iex.Binop.arg2->Iex.Const.con->Ico.U32)))));
1944 ((Long)(e->Iex.Binop.arg1->Iex.Const.con->Ico.U64)
1945 <= (Long)(e->Iex.Binop.arg2->Iex.Const.con->Ico.U64)))));
1951 ((Int)(e->Iex.Binop.arg1->Iex.Const.con->Ico.U32)
1952 < (Int)(e->Iex.Binop.arg2->Iex.Const.con->Ico.U32)))));
1956 ((Long)(e->Iex.Binop.arg1->Iex.Const.con->Ico.U64)
1957 < (Long)(e->Iex.Binop.arg2->Iex.Const.con->Ico.U64)))));
1963 ((UInt)(e->Iex.Binop.arg1->Iex.Const.con->Ico.U32)
1964 < (UInt)(e->Iex.Binop.arg2->Iex.Const.con->Ico.U32)))));
1968 ((ULong)(e->Iex.Binop.arg1->Iex.Const.con->Ico.U64)
1969 < (ULong)(e->Iex.Binop.arg2->Iex.Const.con->Ico.U64)))));
1975 UInt u32a = e->Iex.Binop.arg1->Iex.Const.con->Ico.U32;
1976 UInt u32b = e->Iex.Binop.arg2->Iex.Const.con->Ico.U32;
1993 (((ULong)(e->Iex.Binop.arg1
1994 ->Iex.Const.con->Ico.U32)) << 32)
1995 | ((ULong)(e->Iex.Binop.arg2->Iex.Const.con->Ico.U32))
2010 ULong argHi = e->Iex.Binop.arg1->Iex.Const.con->Ico.U64;
2011 ULong argLo = e->Iex.Binop.arg2->Iex.Const.con->Ico.U64;
2021 IRExpr* argHi = e->Iex.Binop.arg1;
2022 IRExpr* argLo = e->Iex.Binop.arg2;
2035 UShort arg1 = e->Iex.Binop.arg1->Iex.Const.con->Ico.V128;
2036 UShort arg2 = e->Iex.Binop.arg2->Iex.Const.con->Ico.V128;
2052 switch (e->Iex.Binop.op) {
2058 if (isZeroU(e->Iex.Binop.arg2)) {
2059 e2 = e->Iex.Binop.arg1;
2063 if (isZeroU(e->Iex.Binop.arg1)) {
2064 e2 = e->Iex.Binop.arg1;
2071 if (isZeroU(e->Iex.Binop.arg2)) {
2072 e2 = e->Iex.Binop.arg1;
2083 if (isZeroU(e->Iex.Binop.arg2)) {
2084 e2 = e->Iex.Binop.arg1;
2088 if (isZeroU(e->Iex.Binop.arg1)) {
2089 e2 = e->Iex.Binop.arg2;
2094 if (isOnesU(e->Iex.Binop.arg1) || isOnesU(e->Iex.Binop.arg2)) {
2095 e2 = mkOnesOfPrimopResultType(e->Iex.Binop.op);
2099 if (sameIRExprs(env, e->Iex.Binop.arg1, e->Iex.Binop.arg2)) {
2100 e2 = e->Iex.Binop.arg1;
2111 if (sameIRExprs(env, e->Iex.Binop.arg1, e->Iex.Binop.arg2)) {
2112 e2 = IRExpr_Binop(Iop_Shl8, e->Iex.Binop.arg1,
2123 if (isZeroU(e->Iex.Binop.arg2)) {
2124 e2 = e->Iex.Binop.arg1;
2128 if (isZeroU(e->Iex.Binop.arg1)) {
2129 e2 = e->Iex.Binop.arg2;
2133 if (sameIRExprs(env, e->Iex.Binop.arg1, e->Iex.Binop.arg2)) {
2135 e->Iex.Binop.op == Iop_Add32 ? Iop_Shl32 : Iop_Shl64,
2136 e->Iex.Binop.arg1, IRExpr_Const(IRConst_U8(1)));
2144 if (isZeroU(e->Iex.Binop.arg2)) {
2145 e2 = e->Iex.Binop.arg1;
2149 if (sameIRExprs(env, e->Iex.Binop.arg1, e->Iex.Binop.arg2)) {
2150 e2 = mkZeroOfPrimopResultType(e->Iex.Binop.op);
2156 if (isZeroV128(e->Iex.Binop.arg2)) {
2157 e2 = e->Iex.Binop.arg1;
2165 if (isOnesU(e->Iex.Binop.arg2)) {
2166 e2 = e->Iex.Binop.arg1;
2170 if (isZeroU(e->Iex.Binop.arg2)) {
2171 e2 = e->Iex.Binop.arg2;
2175 if (isZeroU(e->Iex.Binop.arg1)) {
2176 e2 = e->Iex.Binop.arg1;
2180 if (sameIRExprs(env, e->Iex.Binop.arg1, e->Iex.Binop.arg2)) {
2181 e2 = e->Iex.Binop.arg1;
2192 if (sameIRExprs(env, e->Iex.Binop.arg1, e->Iex.Binop.arg2)) {
2193 e2 = e->Iex.Binop.arg1;
2198 if (e->Iex.Binop.op == Iop_And64
2199 && (isZeroU64(e->Iex.Binop.arg1)
2200 || isZeroU64(e->Iex.Binop.arg2))) {
2201 e2 = mkZeroOfPrimopResultType(e->Iex.Binop.op);
2203 } else if (e->Iex.Binop.op == Iop_AndV128
2204 && (isZeroV128(e->Iex.Binop.arg1)
2205 || isZeroV128(e->Iex.Binop.arg2))) {
2206 e2 = mkZeroOfPrimopResultType(e->Iex.Binop.op);
2214 if (sameIRExprs(env, e->Iex.Binop.arg1, e->Iex.Binop.arg2)) {
2215 e2 = e->Iex.Binop.arg1;
2219 if (e->Iex.Binop.op == Iop_OrV128) {
2220 if (isZeroV128(e->Iex.Binop.arg2)) {
2221 e2 = e->Iex.Binop.arg1;
2224 if (isZeroV128(e->Iex.Binop.arg1)) {
2225 e2 = e->Iex.Binop.arg2;
2230 if (e->Iex.Binop.op == Iop_OrV256) {
2231 if (isZeroV256(e->Iex.Binop.arg2)) {
2232 e2 = e->Iex.Binop.arg1;
2236 //if (isZeroV256(e->Iex.Binop.arg1)) {
2237 // e2 = e->Iex.Binop.arg2;
2249 if (sameIRExprs(env, e->Iex.Binop.arg1, e->Iex.Binop.arg2)) {
2250 e2 = mkZeroOfPrimopResultType(e->Iex.Binop.op);
2257 if (sameIRExprs(env, e->Iex.Binop.arg1, e->Iex.Binop.arg2)) {
2258 e2 = mkZeroOfPrimopResultType(e->Iex.Binop.op);
2262 if (isZeroU32(e->Iex.Binop.arg2)) {
2263 IRExpr* a1 = chase(env, e->Iex.Binop.arg1);
2265 && a1->Iex.Unop.op == Iop_1Uto32) {
2266 e2 = a1->Iex.Unop.arg;
2278 if (sameIRExprs(env, e->Iex.Binop.arg1, e->Iex.Binop.arg2)) {
2279 e2 = mkOnesOfPrimopResultType(e->Iex.Binop.op);
2293 if (e->Iex.ITE.cond->tag == Iex_Const) {
2295 vassert(e->Iex.ITE.cond->Iex.Const.con->tag == Ico_U1);
2296 e2 = e->Iex.ITE.cond->Iex.Const.con->Ico.U1
2297 ? e->Iex.ITE.iftrue : e->Iex.ITE.iffalse;
2301 if (sameIRExprs(env, e->Iex.ITE.iftrue,
2302 e->Iex.ITE.iffalse)) {
2303 e2 = e->Iex.ITE.iffalse;
2330 && !debug_only_hack_sameIRExprs_might_assert(e->Iex.Binop.arg1,
2331 e->Iex.Binop.arg2)
2332 && sameIRExprs(env, e->Iex.Binop.arg1, e->Iex.Binop.arg2)) {
2370 if (env[(Int)ex->Iex.RdTmp.tmp] != NULL) {
2371 IRExpr *rhs = env[(Int)ex->Iex.RdTmp.tmp];
2375 && rhs->Iex.Const.con->tag != Ico_F64i)
2386 vassert(isIRAtom(ex->Iex.GetI.ix));
2388 ex->Iex.GetI.descr,
2389 subst_Expr(env, ex->Iex.GetI.ix),
2390 ex->Iex.GetI.bias
2394 IRQop* qop = ex->Iex.Qop.details;
2409 IRTriop* triop = ex->Iex.Triop.details;
2422 vassert(isIRAtom(ex->Iex.Binop.arg1));
2423 vassert(isIRAtom(ex->Iex.Binop.arg2));
2425 ex->Iex.Binop.op,
2426 subst_Expr(env, ex->Iex.Binop.arg1),
2427 subst_Expr(env, ex->Iex.Binop.arg2)
2431 vassert(isIRAtom(ex->Iex.Unop.arg));
2433 ex->Iex.Unop.op,
2434 subst_Expr(env, ex->Iex.Unop.arg)
2438 vassert(isIRAtom(ex->Iex.Load.addr));
2440 ex->Iex.Load.end,
2441 ex->Iex.Load.ty,
2442 subst_Expr(env, ex->Iex.Load.addr)
2447 IRExpr** args2 = shallowCopyIRExprVec(ex->Iex.CCall.args);
2453 ex->Iex.CCall.cee,
2454 ex->Iex.CCall.retty,
2460 vassert(isIRAtom(ex->Iex.ITE.cond));
2461 vassert(isIRAtom(ex->Iex.ITE.iftrue));
2462 vassert(isIRAtom(ex->Iex.ITE.iffalse));
2464 subst_Expr(env, ex->Iex.ITE.cond),
2465 subst_Expr(env, ex->Iex.ITE.iftrue),
2466 subst_Expr(env, ex->Iex.ITE.iffalse)
2544 vassert(fguard->Iex.Const.con->tag == Ico_U1);
2545 if (fguard->Iex.Const.con->Ico.U1 == False) {
2548 vassert(fguard->Iex.Const.con->Ico.U1 == True);
2571 vassert(fguard->Iex.Const.con->tag == Ico_U1);
2572 if (fguard->Iex.Const.con->Ico.U1 == False) {
2577 vassert(fguard->Iex.Const.con->Ico.U1 == True);
2665 vassert(fcond->Iex.Const.con->tag == Ico_U1);
2666 if (fcond->Iex.Const.con->Ico.U1 == False) {
2670 vassert(fcond->Iex.Const.con->Ico.U1 == True);
2756 && st2->Ist.WrTmp.data->Iex.Const.con->tag != Ico_F64i) {
2770 vassert(guard->Iex.Const.con->tag == Ico_U1);
2771 vassert(guard->Iex.Const.con->Ico.U1 == True);
2819 vassert(guard->Iex.Const.con->tag == Ico_U1);
2820 vassert(guard->Iex.Const.con->Ico.U1 == True);
2875 addUses_Expr(set, e->Iex.GetI.ix);
2878 addUses_Expr(set, e->Iex.ITE.cond);
2879 addUses_Expr(set, e->Iex.ITE.iftrue);
2880 addUses_Expr(set, e->Iex.ITE.iffalse);
2883 for (i = 0; e->Iex.CCall.args[i]; i++)
2884 addUses_Expr(set, e->Iex.CCall.args[i]);
2887 addUses_Expr(set, e->Iex.Load.addr);
2890 addUses_Expr(set, e->Iex.Qop.details->arg1);
2891 addUses_Expr(set, e->Iex.Qop.details->arg2);
2892 addUses_Expr(set, e->Iex.Qop.details->arg3);
2893 addUses_Expr(set, e->Iex.Qop.details->arg4);
2896 addUses_Expr(set, e->Iex.Triop.details->arg1);
2897 addUses_Expr(set, e->Iex.Triop.details->arg2);
2898 addUses_Expr(set, e->Iex.Triop.details->arg3);
2901 addUses_Expr(set, e->Iex.Binop.arg1);
2902 addUses_Expr(set, e->Iex.Binop.arg2);
2905 addUses_Expr(set, e->Iex.Unop.arg);
2908 addUses_Temp(set, e->Iex.RdTmp.tmp);
3003 && e->Iex.Const.con->tag == Ico_U1
3004 && e->Iex.Const.con->Ico.U1 == False );
3011 && e->Iex.Const.con->tag == Ico_U1
3012 && e->Iex.Const.con->Ico.U1 == True );
3122 ex = (*specHelper)( st->Ist.WrTmp.data->Iex.CCall.cee->name,
3123 st->Ist.WrTmp.data->Iex.CCall.args,
3324 dst->u.tmp = arg->Iex.RdTmp.tmp;
3328 dst->u.con = arg->Iex.Const.con;
3626 if (e->Iex.Unop.arg->tag == Iex_RdTmp) {
3629 ae->u.Ut.op = e->Iex.Unop.op;
3630 ae->u.Ut.arg = e->Iex.Unop.arg->Iex.RdTmp.tmp;
3636 if (e->Iex.Binop.arg1->tag == Iex_RdTmp) {
3637 if (e->Iex.Binop.arg2->tag == Iex_RdTmp) {
3640 ae->u.Btt.op = e->Iex.Binop.op;
3641 ae->u.Btt.arg1 = e->Iex.Binop.arg1->Iex.RdTmp.tmp;
3642 ae->u.Btt.arg2 = e->Iex.Binop.arg2->Iex.RdTmp.tmp;
3645 if (e->Iex.Binop.arg2->tag == Iex_Const) {
3648 ae->u.Btc.op = e->Iex.Binop.op;
3649 ae->u.Btc.arg1 = e->Iex.Binop.arg1->Iex.RdTmp.tmp;
3650 ae->u.Btc.con2 = *(e->Iex.Binop.arg2->Iex.Const.con);
3653 } else if (e->Iex.Binop.arg1->tag == Iex_Const
3654 && e->Iex.Binop.arg2->tag == Iex_RdTmp) {
3657 ae->u.Bct.op = e->Iex.Binop.op;
3658 ae->u.Bct.arg2 = e->Iex.Binop.arg2->Iex.RdTmp.tmp;
3659 ae->u.Bct.con1 = *(e->Iex.Binop.arg1->Iex.Const.con);
3665 if (e->Iex.Const.con->tag == Ico_F64i) {
3668 ae->u.Cf64i.f64i = e->Iex.Const.con->Ico.F64i;
3674 if (e->Iex.ITE.cond->tag == Iex_RdTmp) {
3675 if (e->Iex.ITE.iffalse->tag == Iex_RdTmp) {
3676 if (e->Iex.ITE.iftrue->tag == Iex_RdTmp) {
3679 ae->u.Ittt.co = e->Iex.ITE.cond->Iex.RdTmp.tmp;
3680 ae->u.Ittt.e1 = e->Iex.ITE.iftrue->Iex.RdTmp.tmp;
3681 ae->u.Ittt.e0 = e->Iex.ITE.iffalse->Iex.RdTmp.tmp;
3684 if (e->Iex.ITE.iftrue->tag == Iex_Const) {
3687 ae->u.Itct.co = e->Iex.ITE.cond->Iex.RdTmp.tmp;
3688 ae->u.Itct.con1 = *(e->Iex.ITE.iftrue->Iex.Const.con);
3689 ae->u.Itct.e0 = e->Iex.ITE.iffalse->Iex.RdTmp.tmp;
3692 } else if (e->Iex.ITE.iffalse->tag == Iex_Const) {
3693 if (e->Iex.ITE.iftrue->tag == Iex_RdTmp) {
3696 ae->u.Ittc.co = e->Iex.ITE.cond->Iex.RdTmp.tmp;
3697 ae->u.Ittc.e1 = e->Iex.ITE.iftrue->Iex.RdTmp.tmp;
3698 ae->u.Ittc.con0 = *(e->Iex.ITE.iffalse->Iex.Const.con);
3701 if (e->Iex.ITE.iftrue->tag == Iex_Const) {
3704 ae->u.Itcc.co = e->Iex.ITE.cond->Iex.RdTmp.tmp;
3705 ae->u.Itcc.con1 = *(e->Iex.ITE.iftrue->Iex.Const.con);
3706 ae->u.Itcc.con0 = *(e->Iex.ITE.iffalse->Iex.Const.con);
3714 if (e->Iex.GetI.ix->tag == Iex_RdTmp) {
3717 ae->u.GetIt.descr = e->Iex.GetI.descr;
3718 ae->u.GetIt.ix = e->Iex.GetI.ix->Iex.RdTmp.tmp;
3719 ae->u.GetIt.bias = e->Iex.GetI.bias;
3728 ae->u.CCall.cee = e->Iex.CCall.cee;
3729 ae->u.CCall.retty = e->Iex.CCall.retty;
3735 e->Iex.CCall.args
3916 if (e->Iex.Binop.op != Iop_Add32 && e->Iex.Binop.op != Iop_Sub32)
3918 if (e->Iex.Binop.arg1->tag != Iex_RdTmp)
3920 if (e->Iex.Binop.arg2->tag != Iex_Const)
3922 *tmp = e->Iex.Binop.arg1->Iex.RdTmp.tmp;
3923 *i32 = (Int)(e->Iex.Binop.arg2->Iex.Const.con->Ico.U32);
3924 if (e->Iex.Binop.op == Iop_Sub32)
4027 && st->Ist.WrTmp.data->Iex.GetI.ix->tag == Iex_RdTmp
4028 && collapseChain(bb, i-1, st->Ist.WrTmp.data->Iex.GetI.ix
4029 ->Iex.RdTmp.tmp, &var2, &con2)) {
4035 con2 += st->Ist.WrTmp.data->Iex.GetI.bias;
4039 IRExpr_GetI(st->Ist.WrTmp.data->Iex.GetI.descr,
4053 && collapseChain(bb, i-1, puti->ix->Iex.RdTmp.tmp,
4273 s2->Ist.WrTmp.data->Iex.GetI.descr,
4274 s2->Ist.WrTmp.data->Iex.GetI.ix,
4275 s2->Ist.WrTmp.data->Iex.GetI.bias
4283 s2->Ist.WrTmp.data->Iex.Get.offset,
4284 s2->Ist.WrTmp.data->Iex.Get.ty
4327 && st->Ist.WrTmp.data->Iex.GetI.ix->tag == Iex_RdTmp) {
4328 IRRegArray* descr = st->Ist.WrTmp.data->Iex.GetI.descr;
4329 IRExpr* ix = st->Ist.WrTmp.data->Iex.GetI.ix;
4330 Int bias = st->Ist.WrTmp.data->Iex.GetI.bias;
4426 e->Iex.RdTmp.tmp += delta;
4432 deltaIRExpr(e->Iex.GetI.ix, delta);
4435 deltaIRExpr(e->Iex.Qop.details->arg1, delta);
4436 deltaIRExpr(e->Iex.Qop.details->arg2, delta);
4437 deltaIRExpr(e->Iex.Qop.details->arg3, delta);
4438 deltaIRExpr(e->Iex.Qop.details->arg4, delta);
4441 deltaIRExpr(e->Iex.Triop.details->arg1, delta);
4442 deltaIRExpr(e->Iex.Triop.details->arg2, delta);
4443 deltaIRExpr(e->Iex.Triop.details->arg3, delta);
4446 deltaIRExpr(e->Iex.Binop.arg1, delta);
4447 deltaIRExpr(e->Iex.Binop.arg2, delta);
4450 deltaIRExpr(e->Iex.Unop.arg, delta);
4453 deltaIRExpr(e->Iex.Load.addr, delta);
4456 for (i = 0; e->Iex.CCall.args[i]; i++)
4457 deltaIRExpr(e->Iex.CCall.args[i], delta);
4460 deltaIRExpr(e->Iex.ITE.cond, delta);
4461 deltaIRExpr(e->Iex.ITE.iftrue, delta);
4462 deltaIRExpr(e->Iex.ITE.iffalse, delta);
4641 && (udst->Iex.Const.con->tag == Ico_U32
4642 || udst->Iex.Const.con->tag == Ico_U64)) {
4645 xxx_value = udst->Iex.Const.con->tag == Ico_U64
4646 ? udst->Iex.Const.con->Ico.U64
4647 : (Addr64)(udst->Iex.Const.con->Ico.U32);
4694 vassert(con->tag == udst->Iex.Const.con->tag);
4729 vassert(udst->Iex.Const.con->tag == Ico_U32
4730 || udst->Iex.Const.con->tag == Ico_U64);
4731 vassert(con->tag == udst->Iex.Const.con->tag);
4735 udst->Iex.Const.con->Ico.U64 = xxx_value;
4738 udst->Iex.Const.con->Ico.U32 = (UInt)xxx_value;
4878 for (i = 0; e->Iex.CCall.args[i]; i++)
4879 setHints_Expr(doesLoad, getInterval, e->Iex.CCall.args[i]);
4882 setHints_Expr(doesLoad, getInterval, e->Iex.ITE.cond);
4883 setHints_Expr(doesLoad, getInterval, e->Iex.ITE.iftrue);
4884 setHints_Expr(doesLoad, getInterval, e->Iex.ITE.iffalse);
4887 setHints_Expr(doesLoad, getInterval, e->Iex.Qop.details->arg1);
4888 setHints_Expr(doesLoad, getInterval, e->Iex.Qop.details->arg2);
4889 setHints_Expr(doesLoad, getInterval, e->Iex.Qop.details->arg3);
4890 setHints_Expr(doesLoad, getInterval, e->Iex.Qop.details->arg4);
4893 setHints_Expr(doesLoad, getInterval, e->Iex.Triop.details->arg1);
4894 setHints_Expr(doesLoad, getInterval, e->Iex.Triop.details->arg2);
4895 setHints_Expr(doesLoad, getInterval, e->Iex.Triop.details->arg3);
4898 setHints_Expr(doesLoad, getInterval, e->Iex.Binop.arg1);
4899 setHints_Expr(doesLoad, getInterval, e->Iex.Binop.arg2);
4902 setHints_Expr(doesLoad, getInterval, e->Iex.Unop.arg);
4906 setHints_Expr(doesLoad, getInterval, e->Iex.Load.addr);
4909 Int low = e->Iex.Get.offset;
4910 Int high = low + sizeofIRType(e->Iex.Get.ty) - 1;
4915 IRRegArray *descr = e->Iex.GetI.descr;
4920 setHints_Expr(doesLoad, getInterval, e->Iex.GetI.ix);
4960 uses[e->Iex.RdTmp.tmp]++;
4964 aoccCount_Expr(uses, e->Iex.ITE.cond);
4965 aoccCount_Expr(uses, e->Iex.ITE.iftrue);
4966 aoccCount_Expr(uses, e->Iex.ITE.iffalse);
4970 aoccCount_Expr(uses, e->Iex.Qop.details->arg1);
4971 aoccCount_Expr(uses, e->Iex.Qop.details->arg2);
4972 aoccCount_Expr(uses, e->Iex.Qop.details->arg3);
4973 aoccCount_Expr(uses, e->Iex.Qop.details->arg4);
4977 aoccCount_Expr(uses, e->Iex.Triop.details->arg1);
4978 aoccCount_Expr(uses, e->Iex.Triop.details->arg2);
4979 aoccCount_Expr(uses, e->Iex.Triop.details->arg3);
4983 aoccCount_Expr(uses, e->Iex.Binop.arg1);
4984 aoccCount_Expr(uses, e->Iex.Binop.arg2);
4988 aoccCount_Expr(uses, e->Iex.Unop.arg);
4992 aoccCount_Expr(uses, e->Iex.Load.addr);
4996 for (i = 0; e->Iex.CCall.args[i]; i++)
4997 aoccCount_Expr(uses, e->Iex.CCall.args[i]);
5001 aoccCount_Expr(uses, e->Iex.GetI.ix);
5120 return e->tag == Iex_Unop && e->Iex.Unop.op == op;
5123 return e->tag == Iex_Binop && e->Iex.Binop.op == op;
5133 IRExpr_Binop( Iop_Or32, a1->Iex.Unop.arg,
5134 a2->Iex.Unop.arg ) );
5141 return a1->Iex.Unop.arg;
5157 return IRExpr_Unop( Iop_CmpwNEZ64, aa->Iex.Unop.arg );
5160 && is_Unop(aa->Iex.Binop.arg1, Iop_CmpwNEZ64))
5164 aa->Iex.Binop.arg1->Iex.Unop.arg,
5165 aa->Iex.Binop.arg2));
5168 && is_Unop(aa->Iex.Binop.arg2, Iop_CmpwNEZ64))
5172 aa->Iex.Binop.arg1,
5173 aa->Iex.Binop.arg2->Iex.Unop.arg));
5178 return IRExpr_Unop(Iop_CmpNEZ64, aa->Iex.Unop.arg);
5181 return aa->Iex.Unop.arg;
5186 return IRExpr_Unop( Iop_CmpwNEZ32, aa->Iex.Unop.arg );
5191 return IRExpr_Unop(Iop_CmpNEZ32, aa->Iex.Unop.arg);
5194 return aa->Iex.Unop.arg;
5196 if (is_Unop(aa, Iop_64to32) && is_Unop(aa->Iex.Unop.arg, Iop_CmpwNEZ64))
5197 return IRExpr_Unop(Iop_CmpNEZ64, aa->Iex.Unop.arg->Iex.Unop.arg);
5202 return aa->Iex.Unop.arg;
5207 return IRExpr_Unop( Iop_Left32, aa->Iex.Unop.arg );
5212 return IRExpr_Unop( Iop_Left64, aa->Iex.Unop.arg );
5217 return aa->Iex.Unop.arg;
5220 return IRExpr_Unop( Iop_CmpNEZ32, aa->Iex.Unop.arg );
5225 return aa->Iex.Unop.arg;
5228 return IRExpr_Unop( Iop_CmpNEZ64, aa->Iex.Unop.arg );
5233 return aa->Iex.Unop.arg;
5236 return IRExpr_Unop(Iop_8Uto32, aa->Iex.Unop.arg);
5242 return IRExpr_Unop(Iop_8Uto64, aa->Iex.Unop.arg);
5245 return IRExpr_Unop(Iop_16Uto64, aa->Iex.Unop.arg);
5249 && is_Binop(aa->Iex.Unop.arg, Iop_Shr64)
5250 && is_Unop(aa->Iex.Unop.arg->Iex.Binop.arg1, Iop_32Uto64)
5251 && is_Unop(aa->Iex.Unop.arg->Iex.Binop.arg1->Iex.Unop.arg,
5253 return aa->Iex.Unop.arg;
5258 && is_Binop(aa->Iex.Unop.arg, Iop_Shl64)
5259 && is_Unop(aa->Iex.Unop.arg->Iex.Binop.arg1, Iop_32Uto64)
5260 && is_Unop(aa->Iex.Unop.arg->Iex.Binop.arg1->Iex.Unop.arg,
5269 aa->Iex.Unop.arg->Iex.Binop.arg1->Iex.Unop.arg->Iex.Unop.arg,
5270 aa->Iex.Unop.arg->Iex.Binop.arg2
5278 && is_Unop(aa->Iex.Unop.arg, Iop_32to8)
5279 && is_Unop(aa->Iex.Unop.arg->Iex.Unop.arg, Iop_1Uto32)
5280 && is_Unop(aa->Iex.Unop.arg->Iex.Unop.arg->Iex.Unop.arg,
5283 aa->Iex.Unop.arg->Iex.Unop.arg
5284 ->Iex.Unop.arg->Iex.Unop.arg);
5304 args2 = shallowCopyIRExprVec(e->Iex.CCall.args);
5308 e->Iex.CCall.cee,
5309 e->Iex.CCall.retty,
5313 e2 = atbSubst_Temp(env, e->Iex.RdTmp.tmp);
5317 atbSubst_Expr(env, e->Iex.ITE.cond),
5318 atbSubst_Expr(env, e->Iex.ITE.iftrue),
5319 atbSubst_Expr(env, e->Iex.ITE.iffalse)
5323 e->Iex.Qop.details->op,
5324 atbSubst_Expr(env, e->Iex.Qop.details->arg1),
5325 atbSubst_Expr(env, e->Iex.Qop.details->arg2),
5326 atbSubst_Expr(env, e->Iex.Qop.details->arg3),
5327 atbSubst_Expr(env, e->Iex.Qop.details->arg4)
5331 e->Iex.Triop.details->op,
5332 atbSubst_Expr(env, e->Iex.Triop.details->arg1),
5333 atbSubst_Expr(env, e->Iex.Triop.details->arg2),
5334 atbSubst_Expr(env, e->Iex.Triop.details->arg3)
5338 e->Iex.Binop.op,
5339 atbSubst_Expr(env, e->Iex.Binop.arg1),
5340 atbSubst_Expr(env, e->Iex.Binop.arg2)
5344 e->Iex.Unop.op,
5345 atbSubst_Expr(env, e->Iex.Unop.arg)
5349 e->Iex.Load.end,
5350 e->Iex.Load.ty,
5351 atbSubst_Expr(env, e->Iex.Load.addr)
5355 e->Iex.GetI.descr,
5356 atbSubst_Expr(env, e->Iex.GetI.ix),
5357 e->Iex.GetI.bias