On Mon, Oct 17, 2022 at 7:57 PM Takayuki 'January June' Suwa
<jjsuwa_sys3...@yahoo.co.jp> wrote:
> On 2022/10/16 14:03, Max Filippov wrote:
> > There's also the following runtime failures, but only on call0 
> > configuration:
> >
> > +FAIL: gcc.c-torture/execute/20010122-1.c   -O1  execution test
> > +FAIL: gcc.c-torture/execute/20010122-1.c   -O2  execution test
> > +FAIL: gcc.c-torture/execute/20010122-1.c   -O3 -g  execution test
> > +FAIL: gcc.c-torture/execute/20010122-1.c   -Os  execution test
> > +FAIL: gcc.c-torture/execute/20010122-1.c   -O2 -flto 
> > -fno-use-linker-plugin -flto-partition=none  execution test
>
> both assembler outputs with and without this patch are identical on my side

Interesting. In -O1 test I see the following difference that is going to affect
the return value of the corresponding functions:

--- gcc-13-3308-gb4a4c6382b14-call0-le/20010122-1.s      2022-10-17
20:07:32.390363204 -0700
+++ gcc-13-3309-g851636ecd015-call0-le/20010122-1.s      2022-10-17
20:06:36.613785546 -0700
@@ -143,13 +143,10 @@
test2:
       addi    sp, sp, -16
       s32i.n  a0, sp, 12
-       s32i.n  a12, sp, 8
-       mov.n   a12, a0
       l32r    a2, .LC6
       callx0  a2
-       mov.n   a2, a12
+       mov.n   a2, a0
       l32i.n  a0, sp, 12
-       l32i.n  a12, sp, 8
       addi    sp, sp, 16
       ret.n
       .size   test2, .-test2
@@ -161,13 +158,10 @@
test3:
       addi    sp, sp, -16
       s32i.n  a0, sp, 12
-       s32i.n  a12, sp, 8
-       mov.n   a12, a0
       l32r    a2, .LC7
       callx0  a2
-       mov.n   a2, a12
+       mov.n   a2, a0
       l32i.n  a0, sp, 12
-       l32i.n  a12, sp, 8
       addi    sp, sp, 16
       ret.n
       .size   test3, .-test3
@@ -258,14 +252,11 @@
test8:
       addi    sp, sp, -16
       s32i.n  a0, sp, 12
-       s32i.n  a12, sp, 8
-       mov.n   a12, a0
       l32r    a2, .LC12
       callx0  a2
       l32r    a2, .LC13
-       s32i.n  a12, a2, 0
+       s32i.n  a0, a2, 0
       l32i.n  a0, sp, 12
-       l32i.n  a12, sp, 8
       addi    sp, sp, 16
       ret.n
       .size   test8, .-test8

-- 
Thanks.
-- Max

Reply via email to