public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Plus Reload
@ 2011-01-11 13:30 Gidi Nave
  2011-01-11 14:31 ` Ian Lance Taylor
  0 siblings, 1 reply; 15+ messages in thread
From: Gidi Nave @ 2011-01-11 13:30 UTC (permalink / raw)
  To: gcc

Hi,

I have a question regarding Plus reload situation I ran into in my
port (which was taken from branch 4.6):

I got the following insn:  Set d1  (plus r1 -96).
d1 and r1 are 2 registers from different classes.

The reload (which take place at: reload1.c , gen_reload(out = d1, in =
(plus r1 -96)) try 3 options:

1. switch the plus operands:
              set d1 (plus -96 r1)

2. split into 2 insns - reload the const to d1 and then add r1:
              set d1 -96
              set d1  (plus d1 r1)

3. split into 2 insns - copy r1 to d1 and then add the const:
              set d1 r1
              set d1  (plus d1 -96)

GCC tries generating the 1st option - and fails since no valid pattern is found.
Then it tries generating the 2nd option and fails once again, since no
valid pattern is found.
Then it tries generating the 3rd option without constraint validity
check(emit_insn_if_valid_for_reload) like the first 2 attempts,
and creates a new insn which will later fail since it's not satisfying
it's constraints.

My question is: why is GCC certain that one of those 3 attempts must work?
In my case, all 3 resulted insns are not supported by the architecture.

Thanks,
Gidi.

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

end of thread, other threads:[~2011-01-16  8:42 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-11 13:30 Plus Reload Gidi Nave
2011-01-11 14:31 ` Ian Lance Taylor
2011-01-11 14:59   ` Gidi Nave
2011-01-11 15:02     ` Gidi Nave
2011-01-11 15:34     ` Ian Lance Taylor
2011-01-11 16:03       ` Gidi Nave
2011-01-11 17:22         ` Ian Lance Taylor
2011-01-12  6:04           ` Gidi Nave
2011-01-12  6:28             ` Ian Lance Taylor
2011-01-12  8:45               ` Gidi Nave
2011-01-12 13:50                 ` Jeff Law
2011-01-12 14:23                   ` Gidi Nave
2011-01-12 16:11                   ` Dave Korn
2011-01-16  8:42                     ` Gidi Nave
2011-01-11 15:34     ` Jeff Law

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).