From: Segher Boessenkool Date: Wed, 12 Apr 2017 08:31:40 +0000 (+0200) Subject: rs6000: Enforce quad_address_p in TImode atomic_load/store (PR80382) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ba6bf284a5a10ba6eba18135c6df05c479aac5ca;p=gcc.git rs6000: Enforce quad_address_p in TImode atomic_load/store (PR80382) Whatever expand expands to should be valid instructions. The defined instructions here have a quad_memory_operand predicate, which boils down to quad_address_p on the address, so let's test for that instead of only disallowing indexed addresses. * config/rs6000/sync.md (atomic_load, atomic_store + + * config/rs6000/sync.md (atomic_load, atomic_store Bernd Edlinger diff --git a/gcc/config/rs6000/sync.md b/gcc/config/rs6000/sync.md index 160713ac0cf..2a1828e3e7a 100644 --- a/gcc/config/rs6000/sync.md +++ b/gcc/config/rs6000/sync.md @@ -157,8 +157,7 @@ rtx op1 = operands[1]; rtx pti_reg = gen_reg_rtx (PTImode); - // Can't have indexed address for 'lq' - if (indexed_address (XEXP (op1, 0), TImode)) + if (!quad_address_p (XEXP (op1, 0), TImode, false)) { rtx old_addr = XEXP (op1, 0); rtx new_addr = force_reg (Pmode, old_addr); @@ -231,8 +230,7 @@ rtx op1 = operands[1]; rtx pti_reg = gen_reg_rtx (PTImode); - // Can't have indexed address for 'stq' - if (indexed_address (XEXP (op0, 0), TImode)) + if (!quad_address_p (XEXP (op0, 0), TImode, false)) { rtx old_addr = XEXP (op0, 0); rtx new_addr = force_reg (Pmode, old_addr);