On Thu, Jan 26, 2017 at 01:57:02PM +0100, Bernd Schmidt wrote:
> On 01/25/2017 08:46 PM, Segher Boessenkool wrote:
> >
> >It turns out my patch (see the PR) causes (or at least triggers)
> >miscompilations on tilegx.  I will drop it for now.
> 
> Curious, it looked very reasonable. What's needed to reproduce this?

Yeah, quite curious.

I just build a cross compiler (and binutils) targeting tilegx-linux,
and build a Linux kernel (ARCH=tile, defconfig) with that.  In many
places where there are two independent conditional jumps the generated
code before the patch combines the two conditions and does one jump;
the code after the patch completely loses the second condition:

-{ cmpeqi r10, r3, 14 ; cmpeqi r11, r3, -1 }
-{ or r10, r10, r11 }
-{ beqzt r10, fffffff700031ba8 <KBacktraceIterator_restart+0x4f0> }
+{ cmpeqi r10, r3, 14 }
+{ beqzt r10, fffffff700031ba0 <KBacktraceIterator_restart+0x4e8> }

This happens quite a few times.  Sometimes a lot of code is deleted.

It may well be a target problem, but it is stage 4, and I do not
currently have the bandwidth to investigate this.  If you do, please
do :-)


Segher

Reply via email to