From: Claudiu Zissulescu Date: Mon, 27 Mar 2017 10:56:46 +0000 (+0200) Subject: [ARC] Fix move_double_src_operand predicate. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e5dcff3eb55dcccf1ad20d94c0f5680f75f3b75c;p=gcc.git [ARC] Fix move_double_src_operand predicate. Durring compilation process, (subreg (mem ...) ...) can occur. Hence, we need to check if the address of mem is a valid one. This patch is fixing this check by directly calling the address_operand, instead of calling move_double_src_operand, as the latter is always checking against the original mode, thus, returning false when the inner and outer modes are different. gcc/ 2017-03-27 Claudiu Zissulescu * config/arc/predicates.md (move_double_src_operand): Replace the call to move_double_src_operand with a call to address_operand. From-SVN: r246499 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2740aa6a89d..6296cdd33de 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-03-27 Claudiu Zissulescu + + * config/arc/predicates.md (move_double_src_operand): Replace the + call to move_double_src_operand with a call to address_operand. + 2017-03-27 Claudiu Zissulescu * config/arc/elf.h (ARGET_ARC_TP_REGNO_DEFAULT): Define. diff --git a/gcc/config/arc/predicates.md b/gcc/config/arc/predicates.md index 8dd8d558b9e..9e60cb77328 100644 --- a/gcc/config/arc/predicates.md +++ b/gcc/config/arc/predicates.md @@ -318,7 +318,7 @@ /* (subreg (mem ...) ...) can occur here if the inner part was once a pseudo-reg and is now a stack slot. */ if (GET_CODE (SUBREG_REG (op)) == MEM) - return move_double_src_operand (SUBREG_REG (op), mode); + return address_operand (XEXP (SUBREG_REG (op), 0), mode); else return register_operand (op, mode); case MEM :