set AM support for MulS correct (None or Source)
authorChristian Würdig <chriswue@ipd.info.uni-karlsruhe.de>
Mon, 3 Jul 2006 08:53:49 +0000 (08:53 +0000)
committerChristian Würdig <chriswue@ipd.info.uni-karlsruhe.de>
Mon, 3 Jul 2006 08:53:49 +0000 (08:53 +0000)
ir/be/ia32/ia32_transform.c

index 1903353..e98af24 100644 (file)
@@ -2432,7 +2432,13 @@ static ir_node *gen_ia32_l_MulS(ia32_transform_env_t *env) {
        /* and then skip the result Proj, because all needed Projs are already there. */
 
        ir_node *new_op = gen_binop(env, get_binop_left(env->irn), get_binop_right(env->irn), new_rd_ia32_MulS);
-       return get_Proj_pred(new_op);
+       ir_node *muls   = get_Proj_pred(new_op);
+
+       /* MulS cannot have AM for destination */
+       if (get_ia32_am_support(muls) != ia32_am_None)
+               set_ia32_am_support(muls, ia32_am_Source);
+
+       return muls;
 }
 
 GEN_LOWERED_SHIFT_OP(Shl)