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

--- Comment #13 from Jose E. Marchesi <jemarch at gcc dot gnu.org> ---
Thanks.  The new title is way better.  And thank you for the further analysis
and the reproducer that also makes clang to generate the no-verifiable code!

I wonder, is the issue also there when -mno-alu32 is used?  In that case the
generated code doesn't involve "subregs" (or 32-bit operations in assembly-like
syntax):

        .file   "foo.c"
        .text
        .align  3
        .global foo
        .type   foo, @function
foo:
        call    bar
        lddw    %r1,baz
        mov     %r0,%r0
        and     %r0,0xffffffff
        ldxw    %r2,[%r1+0]
        add     %r0,-1
        neg     %r2
        xor     %r0,%r2
        rsh     %r0,63
        exit
        .size   foo, .-foo
        .global baz
        .type   baz, @object
        .lcomm  baz,4,4
        .ident  "GCC: (GNU) 14.0.1 20240226 (experimental)"

Cuper, is the verifier able to track proper values through the xor in this
case?

Reply via email to