fix mux_allowed expecting Proj(Cmp) instead of Cmp
authorMatthias Braun <matze@braunis.de>
Mon, 28 Feb 2011 12:26:10 +0000 (13:26 +0100)
committerMatthias Braun <matze@braunis.de>
Mon, 28 Feb 2011 16:49:10 +0000 (17:49 +0100)
ir/be/ia32/bearch_ia32.c

index 577ad89..4d9a65f 100644 (file)
@@ -1986,19 +1986,16 @@ static int ia32_is_mux_allowed(ir_node *sel, ir_node *mux_false,
                return true;
 
        /* Check Cmp before the node */
-       if (is_Proj(sel)) {
-               ir_node *cmp = get_Proj_pred(sel);
-               if (is_Cmp(cmp)) {
-                       ir_mode *cmp_mode = get_irn_mode(get_Cmp_left(cmp));
-
-                       /* we can't handle 64bit compares */
-                       if (get_mode_size_bits(cmp_mode) > 32)
-                               return false;
-
-                       /* we can't handle float compares */
-                       if (mode_is_float(cmp_mode))
-                               return false;
-               }
+       if (is_Cmp(sel)) {
+               ir_mode *cmp_mode = get_irn_mode(get_Cmp_left(sel));
+
+               /* we can't handle 64bit compares */
+               if (get_mode_size_bits(cmp_mode) > 32)
+                       return false;
+
+               /* we can't handle float compares */
+               if (mode_is_float(cmp_mode))
+                       return false;
        }
 
        /* did we disable cmov generation? */