Do not refetch a value, which we already have.
authorChristoph Mallon <christoph.mallon@gmx.de>
Wed, 25 Apr 2012 12:44:42 +0000 (14:44 +0200)
committerChristoph Mallon <christoph.mallon@gmx.de>
Thu, 26 Apr 2012 07:57:54 +0000 (09:57 +0200)
ast2firm.c

index 441e3e3..75b674c 100644 (file)
@@ -2385,7 +2385,7 @@ static ir_node *create_cast(dbg_info *dbgi, ir_node *value_node,
                        if (from_var != NULL) {
                                ir_node *const addr = create_symconst(dbgi, from_var->v.entity);
                                ir_node *const base = deref_address(dbgi, from_var->base.type, addr);
-                               value_node = new_d_Add(dbgi, value_node, base, get_ir_mode_storage(from_type));
+                               value_node = new_d_Add(dbgi, value_node, base, mode);
                        }
                        if (to_var != NULL) {
                                ir_node *const addr = create_symconst(dbgi, to_var->v.entity);