[Bug tree-optimization/18031] OR of a bitfield and a constant is not optimized at tree level

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Mon Feb 7 19:15:00 GMT 2005

------- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-07 05:55 -------
For the RTL level (at least on PPC), we could combine the following instructions and simplify them:
(insn 15 13 16 0 (set (reg:SI 124)
        (const_int 1 [0x1])) 293 {*movsi_internal1} (nil)
(insn 17 16 18 0 (set (zero_extract:SI (reg:SI 125)
            (const_int 1 [0x1])
            (const_int 0 [0x0]))
        (reg:SI 124)) 112 {insvsi} (insn_list:REG_DEP_TRUE 15 (insn_list:REG_DEP_TRUE 16 (nil)))
    (expr_list:REG_DEAD (reg:SI 124)
(set (reg:SI 121)
       (ior:SI (reg:SI 119)
                 (const_int -2147483648 [0xffffffff80000000])))

For x86 we need to combine and simplify the following code (which is not simplified at the tree level or 
RTL level yet, well is is optimizated with my tree combiner to the correct thing):
unsigned f(unsigned i)
 unsigned t = i&1;
 return t;

           What    |Removed                     |Added
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org


More information about the Gcc-bugs mailing list