summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2016-01-16 07:57:34 -0800
committerH.J. Lu <hjl.tools@gmail.com>2016-01-29 07:58:15 -0800
commitd34879bc026da721244130505dcf46400e5dcf1a (patch)
treecb713a989483d56b958a6962922368b619ea6473
parent32da7a3306d31568f6e12aa95f36279e122454ec (diff)
downloadgcc-hjl/pr69299.tar.gz
Call constraint_satisfied_p to check memory operandhjl/pr69299
Call constraint_satisfied_p, instead of MEM_P and memory_operand, to check for valid memory operand. * ira-costs.c (record_reg_classes): Call constraint_satisfied_p, instead of MEM_P, to check for valid memory operand. * recog.c (asm_operand_ok): Call constraint_satisfied_p, instead of memory_operand, to check for valid memory operand.
-rw-r--r--gcc/ira-costs.c4
-rw-r--r--gcc/recog.c8
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;