This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug optimization/15265] delete_output_reload deletes necessary insn


------- Additional Comments From matz at suse dot de  2004-05-06 13:37 -------
count_occurences should also ignore top-level clobbers, I agree.  But that 
is tangential to this issue and wouldn't fix it.  The occurences of xmm0 
are not in top-level destinations.  There really are two of them here. 
 
The problem is in the counting of n_inherited.  But I don't know the exact 
situation where one operand really must be counted twice, therefore I don't 
see why it is implemented this way. 
 
I.e. I have difficulties to understand the notion of "inherited multiple 
times".  In my mind a former output reload either is inherited or not. 
It might be inherited by multiple reloads from the current insn indeed.  But 
this function and loop counting n_inherited only goes over one reload. 
 
Even with SUBREGs or such I have these difficulties.  For instance if there is 
a "(set (subreg (reg X) 0) plus (subreg (reg X) 0) (subreg (reg X) 0))" 
and reg X must be reloaded, but only (!) in the first operand of the plus, 
which must match the destination. 
 
This is the same situation I am facing in the testcase (assuming there also 
was a former output reload of reg X).  But the SUBREGs don't change this at 
all.  Still there are two occurences of the reload target register (in two 
different operands), but only one needs to be reloaded.  But the one to be 
reloaded is counted twice which is the error I think. 
 
Do you remember situations in which a reload target register needs to be 
counted twice in an in-out reload? 

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15265


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]