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

Robin Dapp <rdapp at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=122221

--- Comment #2 from Robin Dapp <rdapp at gcc dot gnu.org> ---
After looking some more, it is related to PR122221 but not a dup.

GCC's asm still looks similar, just that we use a vx variant now
        vwadd.vv        v1,v3,v2
        vsetvli zero,zero,e16,m1,ta,ma
        vadd.vx v1,v1,a3
        vsetvli zero,zero,e8,mf2,ta,ma
        vnsra.wi        v1,v1,2
vs LLVM's
        vwadd.vx        v10, v8, a3
        vwadd.wv        v10, v10, v9
        vnsrl.wi        v8, v10, 2

GCC with -fno-tree-reassoc:

        vsetivli        zero,8,e16,m1,ta,ma
        vle8.v  v4,0(a1)
        vmv.v.x v1,a3
        vle8.v  v3,0(a2)
        vsetvli zero,zero,e8,mf2,ta,ma
        vwadd.wv        v2,v1,v4
        vwadd.wv        v1,v2,v3
        vnsra.wi        v1,v1,2
        vse8.v  v1,0(a0)

So there's just the vmv.v.x that requires another vsetvl.  I would have
expected us to use a vwadd.wx variant here but we don't.  Maybe that's due to
canonicalization?

Anyway, reassoc doesn't help.

Reply via email to