Hi!

While looking at this PR, I was first surprised that on i?86
we got pseudo = argp + 4 and mem_overlap* was called with
that pseudo + 4 etc.  I don't see why we should force the address
into register for EXPAND_SUM modifier, with this mem_overlap* sees
argp + 8 etc. directly (on i?86, of course on ia64 it still sees
a register and thus the other patch I've posted is needed).

Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

2011-11-25  Jakub Jelinek  <ja...@redhat.com>

        PR middle-end/50074
        * expr.c (expand_expr_addr_expr_1): Don't call force_operand for
        EXPAND_SUM modifier.

--- gcc/expr.c.jj       2011-11-21 16:22:02.000000000 +0100
+++ gcc/expr.c  2011-11-25 12:46:40.070831662 +0100
@@ -7452,7 +7452,8 @@ expand_expr_addr_expr_1 (tree exp, rtx t
            }
 
          if (modifier != EXPAND_INITIALIZER
-             && modifier != EXPAND_CONST_ADDRESS)
+             && modifier != EXPAND_CONST_ADDRESS
+             && modifier != EXPAND_SUM)
            result = force_operand (result, target);
          return result;
        }

        Jakub

Reply via email to