aboutsummaryrefslogtreecommitdiff
path: root/gcc/combine.c
diff options
context:
space:
mode:
authorKenneth Zadeck <zadeck@naturalbridge.com>2012-11-09 13:18:49 +0000
committerKenneth Zadeck <zadeck@gcc.gnu.org>2012-11-09 13:18:49 +0000
commit33ffb5c5ab2327a980c9c656cf9a2b3c2dd39c1b (patch)
tree14eb70250d56758d9b1d2e729de8d07b9421d0c1 /gcc/combine.c
parent3a15c2cf68b2e76a4c0d08361eaba35efa6b99f3 (diff)
downloadgcc-33ffb5c5ab2327a980c9c656cf9a2b3c2dd39c1b.zip
gcc-33ffb5c5ab2327a980c9c656cf9a2b3c2dd39c1b.tar.gz
gcc-33ffb5c5ab2327a980c9c656cf9a2b3c2dd39c1b.tar.bz2
rtl.h (CONST_SCALAR_INT_P): New macro.
2012-11-09 Kenneth Zadeck <zadeck@naturalbridge.com> * rtl.h (CONST_SCALAR_INT_P): New macro. * cfgexpand.c (expand_debug_locations): Changed to use CONST_SCALAR_INT_P macro. * combine.c (try_combine, subst, make_extraction, gen_lowpart_for_combine): Ditto. * cselib.c (entry_and_rtx_equal_p, rtx_equal_for_cselib_1): Ditto. * dwarf2out.c (loc_descriptor): Ditto. * emit-rtl.c (gen_lowpart_common): Ditto. * ira-costs.c (record_reg_classes, record_address_regs): Ditto. * ira-lives.c (single_reg_class): Ditto. * recog.c (simplify_while_replacing, asm_operand_ok, constrain_operands): Ditto. * reload.c (find_reloads): Ditto. * simplify-rtx.c (simplify_unary_operation_1, simplify_const_unary_operation, simplify_binary_operation_1, simplify_const_binary_operation, simplify_relational_operation_1, simplify_subreg): Ditto. From-SVN: r193360
Diffstat (limited to 'gcc/combine.c')
-rw-r--r--gcc/combine.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index 00719a7..4875c96 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -2619,16 +2619,19 @@ try_combine (rtx i3, rtx i2, rtx i1, rtx i0, int *new_direct_jump_p,
constant. */
if (i1 == 0
&& (temp = single_set (i2)) != 0
- && (CONST_INT_P (SET_SRC (temp))
- || CONST_DOUBLE_AS_INT_P (SET_SRC (temp)))
+ && CONST_SCALAR_INT_P (SET_SRC (temp))
&& GET_CODE (PATTERN (i3)) == SET
- && (CONST_INT_P (SET_SRC (PATTERN (i3)))
- || CONST_DOUBLE_AS_INT_P (SET_SRC (PATTERN (i3))))
+ && CONST_SCALAR_INT_P (SET_SRC (PATTERN (i3)))
&& reg_subword_p (SET_DEST (PATTERN (i3)), SET_DEST (temp)))
{
rtx dest = SET_DEST (PATTERN (i3));
int offset = -1;
int width = 0;
+
+ /* There are not explicit tests to make sure that this is not a
+ float, but there is code here that would not be correct if it
+ was. */
+ gcc_assert (GET_MODE_CLASS (GET_MODE (SET_SRC (temp))) != MODE_FLOAT);
if (GET_CODE (dest) == ZERO_EXTRACT)
{
@@ -5104,8 +5107,7 @@ subst (rtx x, rtx from, rtx to, int in_dest, int in_cond, int unique_copy)
if (GET_CODE (new_rtx) == CLOBBER && XEXP (new_rtx, 0) == const0_rtx)
return new_rtx;
- if (GET_CODE (x) == SUBREG
- && (CONST_INT_P (new_rtx) || CONST_DOUBLE_AS_INT_P (new_rtx)))
+ if (GET_CODE (x) == SUBREG && CONST_SCALAR_INT_P (new_rtx))
{
enum machine_mode mode = GET_MODE (x);
@@ -7134,7 +7136,7 @@ make_extraction (enum machine_mode mode, rtx inner, HOST_WIDE_INT pos,
if (mode == tmode)
return new_rtx;
- if (CONST_INT_P (new_rtx) || CONST_DOUBLE_AS_INT_P (new_rtx))
+ if (CONST_SCALAR_INT_P (new_rtx))
return simplify_unary_operation (unsignedp ? ZERO_EXTEND : SIGN_EXTEND,
mode, new_rtx, tmode);
@@ -10658,8 +10660,7 @@ gen_lowpart_for_combine (enum machine_mode omode, rtx x)
/* We can only support MODE being wider than a word if X is a
constant integer or has a mode the same size. */
if (GET_MODE_SIZE (omode) > UNITS_PER_WORD
- && ! ((CONST_INT_P (x) || CONST_DOUBLE_AS_INT_P (x))
- || isize == osize))
+ && ! (CONST_SCALAR_INT_P (x) || isize == osize))
goto fail;
/* X might be a paradoxical (subreg (mem)). In that case, gen_lowpart