aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorDavid Edelsohn <dje.gcc@gmail.com>2015-07-25 01:28:21 +0000
committerDavid Edelsohn <dje@gcc.gnu.org>2015-07-24 21:28:21 -0400
commit64d7fb90be5b6aba8ae99e3510faec8d73df879e (patch)
treedbdb2c3fec9b247df8cbdbf94a7a9569a539909f /gcc/expr.c
parenta406c8ce3f42685e53d8ade8ea4920b26f839ada (diff)
downloadgcc-64d7fb90be5b6aba8ae99e3510faec8d73df879e.zip
gcc-64d7fb90be5b6aba8ae99e3510faec8d73df879e.tar.gz
gcc-64d7fb90be5b6aba8ae99e3510faec8d73df879e.tar.bz2
Revert:
2015-07-23 Alexandre Oliva <aoliva@redhat.com> From-SVN: r226202
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c39
1 files changed, 14 insertions, 25 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index d601129..899a42c 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -9246,7 +9246,7 @@ expand_expr_real_1 (tree exp, rtx target, machine_mode tmode,
rtx op0, op1, temp, decl_rtl;
tree type;
int unsignedp;
- machine_mode mode, dmode;
+ machine_mode mode;
enum tree_code code = TREE_CODE (exp);
rtx subtarget, original_target;
int ignore;
@@ -9377,8 +9377,7 @@ expand_expr_real_1 (tree exp, rtx target, machine_mode tmode,
if (g == NULL
&& modifier == EXPAND_INITIALIZER
&& !SSA_NAME_IS_DEFAULT_DEF (exp)
- && (optimize || !SSA_NAME_VAR (exp)
- || DECL_IGNORED_P (SSA_NAME_VAR (exp)))
+ && (optimize || DECL_IGNORED_P (SSA_NAME_VAR (exp)))
&& stmt_is_replaceable_p (SSA_NAME_DEF_STMT (exp)))
g = SSA_NAME_DEF_STMT (exp);
if (g)
@@ -9457,18 +9456,15 @@ expand_expr_real_1 (tree exp, rtx target, machine_mode tmode,
/* Ensure variable marked as used even if it doesn't go through
a parser. If it hasn't be used yet, write out an external
definition. */
- if (exp)
- TREE_USED (exp) = 1;
+ TREE_USED (exp) = 1;
/* Show we haven't gotten RTL for this yet. */
temp = 0;
/* Variables inherited from containing functions should have
been lowered by this point. */
- if (exp)
- context = decl_function_context (exp);
- gcc_assert (!exp
- || SCOPE_FILE_SCOPE_P (context)
+ context = decl_function_context (exp);
+ gcc_assert (SCOPE_FILE_SCOPE_P (context)
|| context == current_function_decl
|| TREE_STATIC (exp)
|| DECL_EXTERNAL (exp)
@@ -9492,8 +9488,7 @@ expand_expr_real_1 (tree exp, rtx target, machine_mode tmode,
decl_rtl = use_anchored_address (decl_rtl);
if (modifier != EXPAND_CONST_ADDRESS
&& modifier != EXPAND_SUM
- && !memory_address_addr_space_p (exp ? DECL_MODE (exp)
- : GET_MODE (decl_rtl),
+ && !memory_address_addr_space_p (DECL_MODE (exp),
XEXP (decl_rtl, 0),
MEM_ADDR_SPACE (decl_rtl)))
temp = replace_equiv_address (decl_rtl,
@@ -9504,17 +9499,12 @@ expand_expr_real_1 (tree exp, rtx target, machine_mode tmode,
if the address is a register. */
if (temp != 0)
{
- if (exp && MEM_P (temp) && REG_P (XEXP (temp, 0)))
+ if (MEM_P (temp) && REG_P (XEXP (temp, 0)))
mark_reg_pointer (XEXP (temp, 0), DECL_ALIGN (exp));
return temp;
}
- if (exp)
- dmode = DECL_MODE (exp);
- else
- dmode = TYPE_MODE (TREE_TYPE (ssa_name));
-
/* If the mode of DECL_RTL does not match that of the decl,
there are two cases: we are dealing with a BLKmode value
that is returned in a register, or we are dealing with
@@ -9522,23 +9512,22 @@ expand_expr_real_1 (tree exp, rtx target, machine_mode tmode,
of the wanted mode, but mark it so that we know that it
was already extended. */
if (REG_P (decl_rtl)
- && dmode != BLKmode
- && GET_MODE (decl_rtl) != dmode)
+ && DECL_MODE (exp) != BLKmode
+ && GET_MODE (decl_rtl) != DECL_MODE (exp))
{
machine_mode pmode;
/* Get the signedness to be used for this variable. Ensure we get
the same mode we got when the variable was declared. */
- if (code != SSA_NAME)
- pmode = promote_decl_mode (exp, &unsignedp);
- else if ((g = SSA_NAME_DEF_STMT (ssa_name))
- && gimple_code (g) == GIMPLE_CALL
- && !gimple_call_internal_p (g))
+ if (code == SSA_NAME
+ && (g = SSA_NAME_DEF_STMT (ssa_name))
+ && gimple_code (g) == GIMPLE_CALL
+ && !gimple_call_internal_p (g))
pmode = promote_function_mode (type, mode, &unsignedp,
gimple_call_fntype (g),
2);
else
- pmode = promote_ssa_mode (ssa_name, &unsignedp);
+ pmode = promote_decl_mode (exp, &unsignedp);
gcc_assert (GET_MODE (decl_rtl) == pmode);
temp = gen_lowpart_SUBREG (mode, decl_rtl);