https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117688

--- Comment #3 from Krister Walfridsson <kristerw at gcc dot gnu.org> ---
The test still fails for me when running on qemu with a compiler built from
today's source code (64d31343d4676d8ceef9232dcd33824bc2eff330).

FWIW, the function foo is generated as:

foo:
        lui     a4,%hi(y)
        lui     a5,%hi(x)
        lbu     a5,%lo(x)(a5)
        lbu     a3,%lo(y)(a4)
        lui     a2,%hi(result)
        sub     a4,a5,a3
        xor     a3,a5,a3
        xor     a5,a5,a4
        and     a5,a5,a3
        srli    a5,a5,7
        neg     a3,a5
        addi    a5,a5,-1
        and     a5,a4,a5
        andi    a4,a3,127
        or      a5,a5,a4
        sb      a5,%lo(result)(a2)
        ret

This is identical to the code generated in Compiler Explorer for the trunk
compiler (https://godbolt.org/z/Krvd33K1j) so I do not think I have messed up
my environment...

Reply via email to