we can use a simpler test again with fixed smaller_mode
authorMatthias Braun <matze@braunis.de>
Thu, 11 Oct 2007 16:12:24 +0000 (16:12 +0000)
committerMatthias Braun <matze@braunis.de>
Thu, 11 Oct 2007 16:12:24 +0000 (16:12 +0000)
[r16154]

ir/ir/iropt.c

index d7896ae..e84ec29 100644 (file)
@@ -1200,7 +1200,7 @@ static ir_node *equivalent_node_Conv(ir_node *n) {
                                n = b; /* Convb(Conv*(xxxb(...))) == xxxb(...) */
                                DBG_OPT_ALGSIM1(oldn, a, b, n, FS_OPT_CONV);
                        } else if (mode_is_int(n_mode)) {
-                               if (smaller_mode(b_mode, a_mode)){
+                               if (get_mode_size_bits(b_mode) <= get_mode_size_bits(a_mode)) {
                                        n = b;        /* ConvS(ConvL(xxxS(...))) == xxxS(...) */
                                        DBG_OPT_ALGSIM1(oldn, a, b, n, FS_OPT_CONV);
                                }
@@ -3518,9 +3518,7 @@ static ir_node *transform_node_Proj_Cmp(ir_node *proj) {
                ir_mode *mode_left   = get_irn_mode(op_left);
                ir_mode *mode_right  = get_irn_mode(op_right);
 
-               if (smaller_mode(mode_left, mode) && smaller_mode(mode_right, mode)
-                               && mode_is_signed(mode) == mode_is_signed(mode_left)
-                               && mode_is_signed(mode) == mode_is_signed(mode_right)) {
+               if (smaller_mode(mode_left, mode) && smaller_mode(mode_right, mode)) {
                        ir_graph *irg   = current_ir_graph;
                        ir_node  *block = get_nodes_block(n);