[Bug rtl-optimization/78378] [5/6/7 Regression] wrong code when combining shift + mult + zero_extend

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Nov 16 17:51:00 GMT 2016


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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Scratch that, I've missed there the 8 SUBREG_BYTE.  That one is fine.
What is wrong is combine_simplify_rtx turning
(set (reg:SI 99 [ x ])
    (and:SI (subreg:SI (truncate:HI (lshiftrt:TI (mult:TI (zero_extend:TI
(reg:DI 96))
                        (zero_extend:TI (reg:DI 98)))
                    (const_int 64 [0x40]))) 0)
        (const_int 65535 [0xffff])))
into
(set (reg:SI 99 [ x ])
    (zero_extend:SI (mult:HI (subreg:HI (reg:DI 96) 0)
            (subreg:HI (reg:DI 98) 0))))


More information about the Gcc-bugs mailing list