diff options
author | Jason Merrill <jason@yorick.cygnus.com> | 1999-06-23 00:49:46 +0000 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 1999-06-22 20:49:46 -0400 |
commit | 5f652c070f1060b110828aeb06551321bd607dde (patch) | |
tree | 447967b076bf125f03ca262bb8c3d97515e80825 /gcc/expr.c | |
parent | 49208cca8d7d28b3fede5e7c2ab47864d90e1469 (diff) | |
download | gcc-5f652c070f1060b110828aeb06551321bd607dde.zip gcc-5f652c070f1060b110828aeb06551321bd607dde.tar.gz gcc-5f652c070f1060b110828aeb06551321bd607dde.tar.bz2 |
expr.c (expand_expr): STRIP_NOPS before checking against MAX_INTEGER_COMPUTATION_MODE
* expr.c (expand_expr): STRIP_NOPS before checking against
MAX_INTEGER_COMPUTATION_MODE
(check_max_integer_computation_mode): Likewise.
From-SVN: r27715
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -5397,9 +5397,13 @@ void check_max_integer_computation_mode (exp) tree exp; { - enum tree_code code = TREE_CODE (exp); + enum tree_code code; enum machine_mode mode; + /* Strip any NOPs that don't change the mode. */ + STRIP_NOPS (exp); + code = TREE_CODE (exp); + /* We must allow conversions of constants to MAX_INTEGER_COMPUTATION_MODE. */ if (code == NOP_EXPR && TREE_CODE (TREE_OPERAND (exp, 0)) == INTEGER_CST) @@ -5578,7 +5582,12 @@ expand_expr (exp, target, tmode, modifier) } #ifdef MAX_INTEGER_COMPUTATION_MODE + /* Only check stuff here if the mode we want is different from the mode + of the expression; if it's the same, check_max_integer_computiation_mode + will handle it. Do we really need to check this stuff at all? */ + if (target + && GET_MODE (target) != mode && TREE_CODE (exp) != INTEGER_CST && TREE_CODE (exp) != PARM_DECL && TREE_CODE (exp) != ARRAY_REF @@ -5595,7 +5604,8 @@ expand_expr (exp, target, tmode, modifier) fatal ("unsupported wide integer operation"); } - if (TREE_CODE (exp) != INTEGER_CST + if (tmode != mode + && TREE_CODE (exp) != INTEGER_CST && TREE_CODE (exp) != PARM_DECL && TREE_CODE (exp) != ARRAY_REF && TREE_CODE (exp) != COMPONENT_REF |