[PATCH] Fix ICE on user view-conversion (v2)

Eric Botcazou ebotcazou@adacore.com
Sat Sep 27 10:52:00 GMT 2008


> So we're going to avoid putting one 4 byte constant into memory
> in exchange for 12 bytes of instructions to put the constant
> onto the stack?  That seems a bit silly to me.

For the testcase the stack is not touched in the end at -O because of DSE:

(insn 5 4 6 2 colors.adb:25 (set (reg:SI 195)
        (const_int 16908288 [0x1020000])) 219 {*movsi_internal} (nil))

(insn 6 5 7 2 colors.adb:25 (set (reg:SI 194)
        (ior:SI (reg:SI 195)
            (const_int 772 [0x304]))) 112 {*iorsi3} (expr_list:REG_EQUAL 
(const_int 16909060 [0x1020304])
        (nil)))

(insn 7 6 8 2 colors.adb:25 (set (mem/c/i:SI (plus:SI (reg/f:SI 78 $frame)
                (const_int 16 [0x10])) [0 S4 A32])
        (reg:SI 194)) 219 {*movsi_internal} (nil))

is turned into

(insn 5 4 6 2 colors.adb:25 (set (reg:SI 195)
        (const_int 16908288 [0x1020000])) 219 {*movsi_internal} (nil))

(insn 6 5 65 2 colors.adb:25 (set (reg:SI 194)
        (ior:SI (reg:SI 195)
            (const_int 772 [0x304]))) 112 {*iorsi3} (expr_list:REG_EQUAL 
(const_int 16909060 [0x1020304])
        (nil)))

(insn 65 6 64 2 colors.adb:25 (set (reg:SI 238)
        (reg:SI 194)) -1 (nil))

-- 
Eric Botcazou



More information about the Gcc-patches mailing list