http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55894



Jakub Jelinek <jakub at gcc dot gnu.org> changed:



           What    |Removed                     |Added

----------------------------------------------------------------------------

                 CC|                            |jakub at gcc dot gnu.org



--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-01-07 
14:25:33 UTC ---

The reason why it doesn't happen during combine is that the insns don't allow

constants, they require loads from memory, so while the compiler is aware

of the folded constant, e.g. in the g function:

(insn 12 7 15 2 (set (reg/i:V2DF 21 xmm0)

        (subreg:V2DF (reg:V2DI 65 [ D.4526 ]) 0)) pr55894.c:16 1157

{*movv2df_internal}

     (expr_list:REG_DEAD (reg:V2DI 65 [ D.4526 ])

        (expr_list:REG_EQUAL (const_vector:V2DF [

                    (const_double:DF +QNaN [+QNaN])

                    (const_double:DF +QNaN [+QNaN])

                ])

            (nil))))

it fails to match and thus isn't actually used in the code.  A pass that would

see you load a constant from memory, do some transformations on it which are

all foldable by the compiler and transforming that into just load of a

different constant could handle this (or do it in combine?), but the problem

with that is that it could in theory increase the constant pool too much.

Reply via email to