This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC,PATCH] combine: Don't simplify subregs of promoted types


> (insn 8 7 9 2 (set (reg:DI 45)
>         (reg:DI 2 %r2)) 51 {*movdi_64} (insn_list:REG_DEP_TRUE 7 (nil))
>     (expr_list:REG_DEAD (reg:DI 2 %r2)
>         (nil)))
> 
> (insn 9 8 10 2 (set (reg:SI 43 [ D.1596 ])
>         (subreg/s:SI (reg:DI 45) 4)) 55 {*movsi_zarch} (insn_list:REG_DEP_TRUE 8 (nil))
>     (expr_list:REG_DEAD (reg:DI 45)
>         (nil)))
> 
> (insn 10 9 14 2 (set (reg:DI 47 [ D.1596 ])
>         (sign_extend:DI (reg:SI 43 [ D.1596 ]))) 113 {*extendsidi2} (insn_list:REG_DEP_TRUE 9 (nil))
>     (expr_list:REG_DEAD (reg:SI 43 [ D.1596 ])
>         (nil)))

I've accidently posted the rtl of the signed case.  Here the same for:

unsigned int f () { return 1; }
unsigned int g () { return f (); }

compiled with gcc -O3 -fno-optimize-sibling-calls -fno-inline:

(insn 8 7 9 2 (set (reg:DI 45)
        (reg:DI 2 %r2)) 51 {*movdi_64} (insn_list:REG_DEP_TRUE 7 (nil))
    (expr_list:REG_DEAD (reg:DI 2 %r2)
        (nil)))

(insn 9 8 10 2 (set (reg:SI 43 [ D.1596 ])
        (subreg/s/u:SI (reg:DI 45) 4)) 55 {*movsi_zarch} (insn_list:REG_DEP_TRUE 8 (nil))
    (expr_list:REG_DEAD (reg:DI 45)
        (nil)))

(insn 10 9 14 2 (set (reg:DI 47 [ D.1596 ])
        (zero_extend:DI (reg:SI 43 [ D.1596 ]))) 124 {*zero_extendsidi2} (insn_list:REG_DEP_TRUE 9 (ni
l))
    (expr_list:REG_DEAD (reg:SI 43 [ D.1596 ])
        (nil)))


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]