This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Small problem in cse
- To: law at cygnus dot com
- Subject: Re: Small problem in cse
- From: chris at lslsun dot epfl dot ch (Christian Iseli)
- Date: Mon, 27 Oct 1997 08:45:38 +0100
- Cc: egcs at cygnus dot com
Sorry folks, I sent this with the wrong subject... I'll just resend it here
so that threading and procmail freaks don't get confused...
>> Sorry, I meant to say why is classp->first_same_value NULL?
>> From my review of the code I don't see that classp->first_same_value
>> should ever be NULL -- thus I suspect something has gone wrong
>> elsewhere that needs to be investigated.
>> But I could be wrong, since you've got a target & testcase which
>> triggers this problem you'll need to do some of the analysis.
>Ok, I'll do my best and keep you posted...
Well, it seems you were right about the fact that first_same_value should never
be null... but here is what I managed to observe so far...
cse_insn is called with the following insn
(insn 4708 4707 4709 (set (subreg:SF (reg/v:SI 47) 0)
(const_double:SF (const_int 0) 0 1076953088)) 4 {movsf} (nil)
(expr_list:REG_EQUAL (minus:SF (const_double:SF (const_int 0) 0 1077018624)
(const_double:SF (cc0) 0 1072693248))
(nil)))
This is for an 8-bit target, where the source is attempting to do a
pre-decrement of a long double
number. The target defines float as TQF (24 bits), double and long double are
both SF (32 bits).
During the processing, the subreg case around line 7390 of cse.c is entered.
a classp is found, and its exp field is (subreg:SI (reg/v:SF 35) 0). At the
next loop iteration,
new_src is set from gen_lowpart_if_possible to the same expression (subreg:SI
(reg/v:SF 35) 0).
The *bad* thing is that HASH produces a different value than it did when
classp->exp was hashed.
So, when insert_regs is called, the element pointed to by classp is deleted
from the hash table
and thus classp->first_same_value becomes 0...
But now I'm stuck (and tired... ;-). What would be the right thing(tm) to do
now?
Christian