Re: [Patch,AVR]: Fix PR49903

2011-08-13 Thread Hans-Peter Nilsson
On Sat, 13 Aug 2011, Georg-Johann Lay wrote: > Hans-Peter Nilsson schrieb: > > A glance at AVR makes me think this should already be handled by > > the NOTICE_UPDATE_CC machinery. Any analysis why this doesn't > > happen? With the same test-case (at -Os) I don't see redundant > > compares for cri

Re: [Patch,AVR]: Fix PR49903

2011-08-13 Thread Georg-Johann Lay
Hans-Peter Nilsson schrieb: On Thu, 11 Aug 2011, Georg-Johann Lay wrote: This is an optimization in machine dependent reorg to remove redundant comparisons like in cc0 = compare (Reg, Num) if (cc0 == 0) goto L1 cc0 = compare (Reg, Num) if (cc0 > 0) goto L2 The second compar

Re: [Patch,AVR]: Fix PR49903

2011-08-12 Thread Hans-Peter Nilsson
On Thu, 11 Aug 2011, Georg-Johann Lay wrote: > This is an optimization in machine dependent reorg to > remove redundant comparisons like in > >cc0 = compare (Reg, Num) >if (cc0 == 0) > goto L1 > >cc0 = compare (Reg, Num) >if (cc0 > 0) > goto L2 > > The second comparison

Re: [Patch,AVR]: Fix PR49903

2011-08-11 Thread Denis Chertykov
2011/8/11 Georg-Johann Lay : > This is an optimization in machine dependent reorg to > remove redundant comparisons like in > >   cc0 = compare (Reg, Num) >   if (cc0 == 0) >     goto L1 > >   cc0 = compare (Reg, Num) >   if (cc0 > 0) >     goto L2 > > The second comparison is redundant an can be r

[Patch,AVR]: Fix PR49903

2011-08-11 Thread Georg-Johann Lay
This is an optimization in machine dependent reorg to remove redundant comparisons like in cc0 = compare (Reg, Num) if (cc0 == 0) goto L1 cc0 = compare (Reg, Num) if (cc0 > 0) goto L2 The second comparison is redundant an can be removed. Code like this can be seen in binary