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

--- Comment #17 from Robin Dapp <rdapp at gcc dot gnu.org> ---
Grasping for straws by blaming qemu ;)

At some point we do the vector shift

        vsll.vv v1,v2,v2,v0.t

but the mask v0 is all zeros:
gdb:
   b = {0 <repeats 16 times>}

According to the mask-undisturbed policy set before
        vsetvli zero,zero,e32,mf2,ta,mu

all elements should be unchanged.  I'm seeing an all-zeros result in v1,
though.
v1 is used as 'j', is zero and therefore 'q' is not incremented and we don't
assign c = d causing the wrong result.

Before the shift I see v2 in gdb as:
  w = {4294967295, 4294967295, 0, 0}
(That's also a bit dubious because we load 2 elements from 'g' of which only
one should be -1.  This doesn't change the end result, though.)

After the shift gdb shows v1 as:
   w = {0, 0, 0, 0},

when it should be w = {-1, -1, 0, 0}.

Does this make sense?

Reply via email to