do not emit contraint copy for set
authorChristian Würdig <chriswue@ipd.info.uni-karlsruhe.de>
Wed, 3 May 2006 13:30:05 +0000 (13:30 +0000)
committerChristian Würdig <chriswue@ipd.info.uni-karlsruhe.de>
Wed, 3 May 2006 13:30:05 +0000 (13:30 +0000)
ir/be/ia32/bearch_ia32.c

index 54d8bc8..ee2ca88 100644 (file)
@@ -510,6 +510,14 @@ static void ia32_prepare_graph(void *self) {
        DEBUG_ONLY(cg->mod = old_mod;)
 }
 
+static INLINE int need_constraint_copy(ir_node *irn) {
+       return \
+               ! is_ia32_Lea(irn)          && \
+               ! is_ia32_Conv_I2I(irn)     && \
+               ! is_ia32_Conv_I2I8Bit(irn) && \
+               ! is_ia32_CMov(irn)         && \
+               ! is_ia32_Set(irn);
+}
 
 /**
  * Insert copies for all ia32 nodes where the should_be_same requirement
@@ -535,9 +543,7 @@ static void ia32_finish_node(ir_node *irn, void *env) {
                block = get_nodes_block(irn);
 
                /* check all OUT requirements, if there is a should_be_same */
-               if ((op_tp == ia32_Normal || op_tp == ia32_AddrModeS) &&
-                       ! is_ia32_Lea(irn) && ! is_ia32_Conv_I2I(irn) && ! is_ia32_Conv_I2I8Bit(irn) &&
-                       ! is_ia32_CMov(irn))
+               if ((op_tp == ia32_Normal || op_tp == ia32_AddrModeS) && need_constraint_copy(irn))
                {
                        for (i = 0; i < n_res; i++) {
                                if (arch_register_req_is(&(reqs[i]->req), should_be_same)) {