Fixed and simplified rot matcher
[libfirm] / ir / stat / stat_dmp.c
index a210c87..04d254e 100644 (file)
@@ -86,10 +86,11 @@ static const struct {
        { FS_OPT_AND,            "algebraic simplification: a & 0b1...1 = 0b1...1 & a = a & a = (a|X) & a = a" },
        { FS_OPT_TO_EOR,         "algebraic simplification: (a|b) & ~(a&b) = a^b" },
        { FS_OPT_EOR_A_A,        "algebraic simplification: a ^ a = 0" },
-       { FS_OPT_EOR_TO_NOT_BOOL,"algebraic simplification: bool ^ 1 = !bool" },
+       { FS_OPT_EOR_A_B_A,      "algebraic simplification: (a ^ b) ^ a = b" },
+       { FS_OPT_EOR_TO_NOT_BOOL,"boolean simplification: bool ^ 1 = !bool" },
        { FS_OPT_EOR_TO_NOT,     "algebraic simplification: x ^ 0b1..1 = ~x, (a ^ b) & b = ~a & b" },
        { FS_OPT_NOT_CMP,        "algebraic simplification: !(a cmp b) = a !cmp b" },
-       { FS_OPT_OR_SHFT_TO_ROT, "algebraic simplification: (x << c) | (x >> (bits - c)) == Rot(x, c)" },
+       { FS_OPT_OR_SHFT_TO_ROTL,"algebraic simplification: (x << c) | (x >> (bits - c)) == Rotl(x, c)" },
        { FS_OPT_REASSOC_SHIFT,  "algebraic simplification: (x SHF c1) SHF c2 = x SHF (c1+c2)" },
        { FS_OPT_SHIFT_AND,      "algebraic simplification: (a SHF c) AND (b SHF c) = (a AND b) SHF c" },
        { FS_OPT_SHIFT_OR,       "algebraic simplification: (a SHF c) OR (b SHF c) = (a OR b) SHF c" },
@@ -97,6 +98,12 @@ static const struct {
        { FS_OPT_CONV,           "algebraic simplification: Conv could be removed" },
        { FS_OPT_CAST,           "algebraic simplification: a Cast could be removed" },
        { FS_OPT_MIN_MAX_EQ,     "algebraic simplification: Min(a,a) = Max(a,a) = a" },
+       { FS_OPT_MUX_BOOL,       "boolean simplification: Muxb(sel, true, false) = sel" },
+       { FS_OPT_MUX_NOT_BOOL,   "boolean simplification: Muxb(sel, false, true) = Not(sel)" },
+       { FS_OPT_MUX_OR_BOOL,    "boolean simplification: Muxb(sel, true, x) = Or(sel, x)" },
+       { FS_OPT_MUX_ORNOT_BOOL, "boolean simplification: Muxb(sel, x, true) = Or(Not(sel), x)" },
+       { FS_OPT_MUX_AND_BOOL,   "boolean simplification: Muxb(sel, x, false) = And(sel, x)" },
+       { FS_OPT_MUX_ANDNOT_BOOL,"boolean simplification: Muxb(sel, false, x) = And(Not(sel), x)" },
        { FS_OPT_MUX_C,          "algebraic simplification: Mux(C, f, t) = C ? t : f" },
        { FS_OPT_MUX_EQ,         "algebraic simplification: Mux(v, x, x) = x" },
        { FS_OPT_MUX_TRANSFORM,  "algebraic simplification: Mux(a, b, c) = b OR Mux(a,b, c) = c" },