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

--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #7)
> The problem is the verifier:
> Mär 26 23:57:12 H systemd[1]: 17: (ac) w0 ^= w3                     ;
> R0_w=scalar()
> R3_w=scalar(smin=smin32=0,smax=umax=smax32=umax32=1,var_off=(0x0; 0x1))
> Mär 26 23:57:12 H systemd[1]: 18: (57) r0 &= 255                    ;
> R0_w=scalar(smin=smin32=0,smax=umax=smax32=umax32=255,var_off=(0x0; 0xff))
> 
> 
> it lost track of what the input of r0 was. It had the right result after the
> xor but then the bit_and didn't take into account the what was before it. It
> just used 0xff.

Or rather the verifier is keeping track of rN and rN_w seperately but GCC
produces code that uses both and that definitely confuses the verifier.

Mär 26 23:57:12 H systemd[1]: 16: (77) r3 >>= 63                    ;
R3_w=scalar(smin=smin32=0,smax=umax=smax32=umax32=1,var_off=(0x0; 0x1))

wait why did the verifier use r3_w here rather than just r3? that seems like
the issue and would fix this issue easier ...

Reply via email to