On 10/07/14 15:56, Joern Rennecke wrote:
On 7 October 2014 18:38, Jeff Law <l...@redhat.com> wrote:
On 10/06/14 20:57, Joern Rennecke wrote:
On 6 October 2014 19:58, Jeff Law <l...@redhat.com> wrote:
What makes word_mode special here? ie, why is special casing for
word_mode
the right thing to do?
The patch does not special-case word mode. The if condition tests if
smode would
cover multiple hard registers.
If that would be the case, smode is replaced with word_mode.
SO I'll ask another way. Why do you want to change smode to word_mode?
Because SImode covers four hard registers, wheras the intention is to
have a single
one.
(concatn:SI [
(reg:SI 18 r18)
(reg:SI 19 r19)
(mem/c:QI (plus:HI (reg/f:HI 28 r28)
(const_int 43 [0x2b])) [6 S1 A8])
(mem/c:QI (plus:HI (reg/f:HI 28 r28)
(const_int 44 [0x2c])) [6 S1 A8])
])
(see original post) is invalid RTL, and thuis the cause of the later ICE.
Thanks. I see the problem now.
Dont we have an ever deeper problem here, namely that registers don't
necessarily have to be word_mode sized objects. More likely than not in
that case the register is going to be larger than word_mode, but I could
also envision a target where there's registers smaller than word_mode.
This stuff seems rather broken/fragile in that world and using word_mode
isn't necessarily any better than what we're doing today.
ISTM it would be better to find the mode of the same class that
corresponds to GET_MODE_SIZE (mode) / nregs. In your case that's
obviously QImode :-)
I think that still breaks in various ways, but probably significantly
less so than what we're doing now or with your current patch.
jeff