On 03/02/2010 08:55 AM, Alain Ketterlin wrote: > > It looks like gcc sometimes produces "useless" conditional branches. > I've found code like this: > > xor %edx,%edx > ; code with no effect on edx (see full code below) > test %edx,%edx > jne <somewhere else> > > The branch on the last line is never taken. Why does gcc generate such > code sequences? Is this patched at runtime, or something? Am I missing > something obvious here?
> Let me know if more detail is needed. We really need a test case, with source, that illustrates the problem. When we have that, we can treat is as a missed-optimization bug. Andrew.