This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH, committed] SH: Fix PR58314 (unsatisfied constraints)
- From: Oleg Endo <oleg dot endo at t-online dot de>
- To: Kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- Cc: christian dot bruel at st dot com, rdsandiford at googlemail dot com, gcc-patches at gcc dot gnu dot org
- Date: Thu, 19 Sep 2013 07:48:05 +0200
- Subject: Re: [PATCH, committed] SH: Fix PR58314 (unsatisfied constraints)
- Authentication-results: sourceware.org; auth=none
- References: <52395C62 dot 5000105 at st dot com> <1379509163 dot 32276 dot 140 dot camel at yam-132-YW-E178-FTW> <5239C90C dot 6040304 at st dot com> <20130919 dot 081524 dot 489555491 dot kkojima at rr dot iij4u dot or dot jp>
On Thu, 2013-09-19 at 08:15 +0900, Kaz Kojima wrote:
> Christian Bruel <firstname.lastname@example.org> wrote:
> > && (!can_create_pseudo_p () && REG_P (operands) && REG_P (operands))"
> > is necessary ?
> It looks an another hack to allow the 2nd and 3rd alternatives only
> when reloading. If so, it might be a bit cleaner to use a special
> predicate like
Yes, that's the idea behind it. Although I must say, I haven't tried it
without the hack, i.e. allowing memories in the insn also before reload.
If it doesn't cause any regressions, it's probably better to put the
reg-reg alternative back to the "*movhi" and "*movqi" insns and move
those above the displacement addressing patterns.
> ;; Returns 1 if OP can be a source of a mov*_reg_reg insn. Same as
> ;; general_movsrc_operand, but mem allowed only when reload in progress.
> (define_predicate "movsrc_reg_reg_operand"
> (match_code "subreg,reg,mem")
> if (reload_in_progress && MEM_P (op))
> return general_movsrc_operand (op, mode);
> return register_operand (op, mode);
> and its dst version for that purpose.
Yes, sorry for suggesting the lazy version.