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

--- Comment #4 from Uroš Bizjak <ubizjak at gmail dot com> ---
It looks that alias set is already wrong when expanding to RTL:

(insn 13 12 14 2 (parallel [
            (set (reg/f:DI 113)
                (plus:DI (reg/f:DI 20 frame)
                    (const_int -64 [0xffffffffffffffc0])))
            (clobber (reg:CC 17 flags))
        ]) pr69909.c:9 219 {*adddi_1}
     (nil))
(insn 14 13 15 2 (parallel [
            (set (reg/f:DI 114)
                (plus:DI (reg/f:DI 16 argp)
                    (const_int 64 [0x40])))
            (clobber (reg:CC 17 flags))
        ]) pr69909.c:9 219 {*adddi_1}
     (nil))
(insn 15 14 16 2 (set (reg:DI 115)
        (const_int 8 [0x8])) pr69909.c:9 85 {*movdi_internal}
     (nil))
(insn 16 15 17 2 (parallel [
            (set (reg:DI 115)
                (const_int 0 [0]))
            (set (reg/f:DI 113)
                (plus:DI (ashift:DI (reg:DI 115)
                        (const_int 2 [0x2]))
                    (reg/f:DI 113)))
            (set (reg/f:DI 114)
                (plus:DI (ashift:DI (reg:DI 115)
                        (const_int 2 [0x2]))
                    (reg/f:DI 114)))
            (set (mem:BLK (reg/f:DI 113) [1  S32 A256])
                (mem/c:BLK (reg/f:DI 114) [1 v32u32_1+0 S32 A256]))
            (use (reg:DI 115))
        ]) pr69909.c:9 942 {*rep_movsi}
     (nil))
(insn 17 16 18 2 (set (reg:TI 116)
        (mem/j/c:TI (plus:DI (reg/f:DI 16 argp)
                (const_int 144 [0x90])) [2 v32u128_1+16 S16 A128])) pr69909.c:9
84 {*movti_internal}
     (nil))
(insn 18 17 19 2 (parallel [
            (set (reg:TI 103 [ _33 ])
                (minus:TI (reg:TI 116)
                    (mem/j/c:TI (plus:DI (reg/f:DI 20 frame)
                            (const_int -48 [0xffffffffffffffd0])) [2  S16
A128])))
            (clobber (reg:CC 17 flags))
        ]) pr69909.c:9 258 {*subti3_doubleword}
     (expr_list:REG_EQUAL (minus:TI (mem/j/c:TI (plus:DI (reg/f:DI 16 argp)
                    (const_int 144 [0x90])) [2 v32u128_1+16 S16 A128])
            (mem/j/c:TI (plus:DI (reg/f:DI 20 frame)
                    (const_int -48 [0xffffffffffffffd0])) [2  S16 A128]))
        (nil)))

Register 113 points to FP-64, so (insn 16) copies 32 bytes to (FP-64 to FP-32).
(Insn 18) later accesses (FP-48 to FP-32), but its alias set [2] is different
from (insn 16) [1]. Later passes are free to move (insn 18) above (insn 16).

Reply via email to