+2019-11-18 Richard Sandiford <richard.sandiford@arm.com>
+
+ * lra-constraints.c (valid_address_p): Take the operand and a
+ constraint as argument. If the operand is a MEM and the constraint
+ is a memory constraint, check whether the eliminated form of the
+ MEM already satisfies the constraint.
+ (process_address_1): Update calls accordingly.
+
2019-11-18 Tom Tromey <tromey@adacore.com>
* doc/tm.texi: Rebuild.
*m_index_loc = m_index_reg;
}
-/* Return true if the eliminated form of AD is a legitimate target address. */
+/* Return true if the eliminated form of AD is a legitimate target address.
+ If OP is a MEM, AD is the address within OP, otherwise OP should be
+ ignored. CONSTRAINT is one constraint that the operand may need
+ to meet. */
static bool
-valid_address_p (struct address_info *ad)
+valid_address_p (rtx op, struct address_info *ad,
+ enum constraint_num constraint)
{
address_eliminator eliminator (ad);
+
+ /* Allow a memory OP if it matches CONSTRAINT, even if CONSTRAINT is more
+ forgiving than "m". */
+ if (MEM_P (op)
+ && (insn_extra_memory_constraint (constraint)
+ || insn_extra_special_memory_constraint (constraint))
+ && constraint_satisfied_p (op, constraint))
+ return true;
+
return valid_address_p (ad->mode, *ad->outer, ad->as);
}
All these cases involve a non-autoinc address, so there is no
point revalidating other types. */
- if (ad.autoinc_p || valid_address_p (&ad))
+ if (ad.autoinc_p || valid_address_p (op, &ad, cn))
return change_p;
/* Any index existed before LRA started, so we can assume that the
if (code >= 0)
{
*ad.inner = gen_rtx_LO_SUM (Pmode, new_reg, addr);
- if (! valid_address_p (ad.mode, *ad.outer, ad.as))
+ if (!valid_address_p (op, &ad, cn))
{
/* Try to put lo_sum into register. */
insn = emit_insn (gen_rtx_SET
if (code >= 0)
{
*ad.inner = new_reg;
- if (! valid_address_p (ad.mode, *ad.outer, ad.as))
+ if (!valid_address_p (op, &ad, cn))
{
*ad.inner = addr;
code = -1;
&& CONSTANT_P (XEXP (SET_SRC (set), 1)))
{
*ad.inner = SET_SRC (set);
- if (valid_address_p (ad.mode, *ad.outer, ad.as))
+ if (valid_address_p (op, &ad, cn))
{
*ad.base_term = XEXP (SET_SRC (set), 0);
*ad.disp_term = XEXP (SET_SRC (set), 1);
+2019-11-18 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.target/aarch64/sve/acle/asm/ld1rq_f16.c: Remove XFAIL.
+ * gcc.target/aarch64/sve/acle/asm/ld1rq_f32.c: Likewise.
+ * gcc.target/aarch64/sve/acle/asm/ld1rq_f64.c: Likewise.
+ * gcc.target/aarch64/sve/acle/asm/ld1rq_s16.c: Likewise.
+ * gcc.target/aarch64/sve/acle/asm/ld1rq_s32.c: Likewise.
+ * gcc.target/aarch64/sve/acle/asm/ld1rq_s64.c: Likewise.
+ * gcc.target/aarch64/sve/acle/asm/ld1rq_u16.c: Likewise.
+ * gcc.target/aarch64/sve/acle/asm/ld1rq_u32.c: Likewise.
+ * gcc.target/aarch64/sve/acle/asm/ld1rq_u64.c: Likewise.
+
2019-11-18 Richard Biener <rguenther@suse.de>
PR tree-optimization/92516