diff options
-rw-r--r-- | gcc/ira-costs.c | 4 | ||||
-rw-r--r-- | gcc/recog.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/gcc/ira-costs.c b/gcc/ira-costs.c index ea5e8b1a0c3..25f47d56fea 100644 --- a/gcc/ira-costs.c +++ b/gcc/ira-costs.c @@ -779,7 +779,9 @@ record_reg_classes (int n_alts, int n_ops, rtx *ops, case CT_MEMORY: /* Every MEM can be reloaded to fit. */ insn_allows_mem[i] = allows_mem[i] = 1; - if (MEM_P (op)) + /* Check constraint_satisfied_p, instead of MEM_P, + for valid memory operand. */ + if (constraint_satisfied_p (op, cn)) win = 1; break; diff --git a/gcc/recog.c b/gcc/recog.c index 3dddbbdf4cf..e60f6b53fe2 100644 --- a/gcc/recog.c +++ b/gcc/recog.c @@ -1790,16 +1790,14 @@ asm_operand_ok (rtx op, const char *constraint, const char **constraints) result = 1; break; - case CT_MEMORY: - /* Every memory operand can be reloaded to fit. */ - result = result || memory_operand (op, VOIDmode); - break; - case CT_ADDRESS: /* Every address operand can be reloaded to fit. */ result = result || address_operand (op, VOIDmode); break; + case CT_MEMORY: + /* Call constraint_satisfied_p, instead of memory_operand, + to check for valid memory operand. */ case CT_FIXED_FORM: result = result || constraint_satisfied_p (op, cn); break; |