[Bug middle-end/41742] Unnecessary zero-extension at -O2 but not -O1

segher at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Mar 2 10:54:00 GMT 2017


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

--- Comment #2 from Segher Boessenkool <segher at gcc dot gnu.org> ---
With current trunk the loop code is better (uses stbu), but the
unnecessary extend still is there:

memset:
        cmpwi 0,5,0
        beqlr 0
        rlwinm 4,4,0,0xff
        mtctr 5
        addi 9,3,-1
        .p2align 4,,15
.L3:
        stbu 4,1(9)
        bdnz .L3
        blr


More information about the Gcc-bugs mailing list