public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* A question about UNSPEC expression and register allocation
@ 2008-05-17  6:10 Mohamed Shafi
  2008-05-18  0:31 ` Paul Brook
  0 siblings, 1 reply; 2+ messages in thread
From: Mohamed Shafi @ 2008-05-17  6:10 UTC (permalink / raw)
  To: GCC

Hello all,

Recently i noticed that register allocation for the operands in a
unspec pattern was going wrong.
This was because there was no conflict between the registers used in
the unspec pattern and the other registers which should have been
there.
During debugging i found out that the code is written in such a way
that it doesn't consider registers used inside an unspec expression.
So i rewrote the patten so that the unspec is in the source rather
than in the destination of the pattern. That solved the issue. But is
this expected?
Will the allocation also go wrong for the source operands if they
contain registers inside an unpsec expression? I still haven't
encountered this.

What about live analysis. How are the registers inside an unspec
expression handled there?

Regards,
Shafi

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: A question about UNSPEC expression and register allocation
  2008-05-17  6:10 A question about UNSPEC expression and register allocation Mohamed Shafi
@ 2008-05-18  0:31 ` Paul Brook
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Brook @ 2008-05-18  0:31 UTC (permalink / raw)
  To: gcc; +Cc: Mohamed Shafi

On Saturday 17 May 2008, Mohamed Shafi wrote:
> Hello all,
>
> Recently i noticed that register allocation for the operands in a
> unspec pattern was going wrong.
> This was because there was no conflict between the registers used in
> the unspec pattern and the other registers which should have been
> there.
> During debugging i found out that the code is written in such a way
> that it doesn't consider registers used inside an unspec expression.
> So i rewrote the patten so that the unspec is in the source rather
> than in the destination of the pattern. That solved the issue. But is
> this expected?
> Will the allocation also go wrong for the source operands if they
> contain registers inside an unpsec expression? I still haven't
> encountered this.

Registers in an unspec are no different to registers used anywhere else.
All the normal rues about overallping operands, early clobbers, etc. apply.

Paul

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-05-18  0:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-17  6:10 A question about UNSPEC expression and register allocation Mohamed Shafi
2008-05-18  0:31 ` Paul Brook

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).