aboutsummaryrefslogtreecommitdiff
path: root/gcc/simplify-rtx.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2015-07-28 19:59:40 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2015-07-28 19:59:40 +0000
commit2a870875df5b51ff8803dc0062fdcb02d15b364d (patch)
tree89bfddfae877a517ba1a218ff9c9be07f1e81d11 /gcc/simplify-rtx.c
parent3b0b0013f6dbe34d2e1ddeacd7e7c26752575680 (diff)
downloadgcc-2a870875df5b51ff8803dc0062fdcb02d15b364d.zip
gcc-2a870875df5b51ff8803dc0062fdcb02d15b364d.tar.gz
gcc-2a870875df5b51ff8803dc0062fdcb02d15b364d.tar.bz2
target-insns.def (can_extend, ptr_extend): New targetm instruction patterns.
gcc/ * target-insns.def (can_extend, ptr_extend): New targetm instruction patterns. * optabs.c (can_extend_p): Use them instead of HAVE_*/gen_* interface. * simplify-rtx.c (simplify_unary_operation_1): Likewise. * emit-rtl.c (set_reg_attrs_from_value): Likewise. * rtlanal.c (nonzero_bits1): Likewise. (num_sign_bit_copies1): Likewise. From-SVN: r226324
Diffstat (limited to 'gcc/simplify-rtx.c')
-rw-r--r--gcc/simplify-rtx.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
index 4332a42..e2f34c4 100644
--- a/gcc/simplify-rtx.c
+++ b/gcc/simplify-rtx.c
@@ -1431,7 +1431,7 @@ simplify_unary_operation_1 (enum rtx_code code, machine_mode mode, rtx op)
}
}
-#if defined(POINTERS_EXTEND_UNSIGNED) && !defined(HAVE_ptr_extend)
+#if defined(POINTERS_EXTEND_UNSIGNED)
/* As we do not know which address space the pointer is referring to,
we can do this only if the target does not support different pointer
or address modes depending on the address space. */
@@ -1442,7 +1442,8 @@ simplify_unary_operation_1 (enum rtx_code code, machine_mode mode, rtx op)
|| (GET_CODE (op) == SUBREG
&& REG_P (SUBREG_REG (op))
&& REG_POINTER (SUBREG_REG (op))
- && GET_MODE (SUBREG_REG (op)) == Pmode)))
+ && GET_MODE (SUBREG_REG (op)) == Pmode))
+ && !targetm.have_ptr_extend ())
return convert_memory_address (Pmode, op);
#endif
break;
@@ -1552,7 +1553,7 @@ simplify_unary_operation_1 (enum rtx_code code, machine_mode mode, rtx op)
GET_MODE (SUBREG_REG (op)));
}
-#if defined(POINTERS_EXTEND_UNSIGNED) && !defined(HAVE_ptr_extend)
+#if defined(POINTERS_EXTEND_UNSIGNED)
/* As we do not know which address space the pointer is referring to,
we can do this only if the target does not support different pointer
or address modes depending on the address space. */
@@ -1563,7 +1564,8 @@ simplify_unary_operation_1 (enum rtx_code code, machine_mode mode, rtx op)
|| (GET_CODE (op) == SUBREG
&& REG_P (SUBREG_REG (op))
&& REG_POINTER (SUBREG_REG (op))
- && GET_MODE (SUBREG_REG (op)) == Pmode)))
+ && GET_MODE (SUBREG_REG (op)) == Pmode))
+ && !targetm.have_ptr_extend ())
return convert_memory_address (Pmode, op);
#endif
break;