This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: store double-cvtd-to-int to memory
- From: Dale Johannesen <dalej at apple dot com>
- To: Geoff Keating <geoffk at geoffk dot org>
- Cc: Dale Johannesen <dalej at apple dot com>, David Edelsohn <dje at watson dot ibm dot com>, Richard Henderson <rth at redhat dot com>, gcc at gcc dot gnu dot org
- Date: Fri, 14 Mar 2003 11:52:46 -0800
- Subject: Re: store double-cvtd-to-int to memory
On Friday, March 14, 2003, at 11:37 AM, Geoff Keating wrote:
David Edelsohn <dje at watson dot ibm dot com> writes:
Can't you just mark the unnecessary temp with "X" constraint for
the pattern that does not need it?
That would be a good idea, but doesn't solve Dale's problem...
Right. The problem is not that the pattern isn't recognized, it's
that combine won't consider it in the first place.
(I did run this by Geoff before asking the list, btw, which
makes me think it's not a case of me missing something trivial.)
Basically I'm trying to get combine to merge these 2 patterns:
(insn 11 10 12 0 0x0 (set (mem:SI (reg:SI 5 r5) [0 S4 A32])
(reg:SI 120)) 309 {*movsi_internal1} (insn_list 10 (nil))
(insn 10 5 11 0 0x0 (parallel [
(set (reg:SI 120)
(fix:SI (reg:DF 33 f1)))
(clobber (reg:DI 121))
(clobber (mem/f:DI (plus:SI (reg/f:SI 30 r30)
(const_int 32 [0x20])) [0 S8 A64]))
It considers generating
(insn 10 5 11 0 0x0 (parallel [
(set (mem:SI (reg:SI 5 r5)
(fix:SI (reg:DF 33 f1)))
(clobber (reg:DI 121))
(clobber (mem/f:DI (plus:SI (reg/f:SI 30 r30)
(const_int 32 [0x20])) [0 S8 A64]))
and rejects that because it thinks the mem's might conflict, as I said
before.
It also considers generating
(set (mem:SI (reg:SI 5 r5)
(fix:SI (reg:DF 33 f1)))
which isn't adequate because I *do* need the floating point scratch reg.
It does not consider generating
(insn 10 5 11 0 0x0 (parallel [
(set (mem:SI (reg:SI 5 r5)
(fix:SI (reg:DF 33 f1)))
(clobber (reg:DI 121))]
which is what I want.
(Not that it has anything to do with this problem, but why is the
scratch
reg DI not DF?)