Jean Christophe Beyler writes:
> As we can see, all three are using the symbol_ref data before adding
> their offset. But after cse, we get this:
> 
> (insn 5 2 6 2 ex1b.c:8 (set (reg/f:DI 74)
>         (const:DI (plus:DI (symbol_ref:DI ("data") <var_decl 0xb7d35058 data>)
>                 (const_int 8 [0x8])))) 71 {movdi_internal} (nil))
> 
> (insn 6 5 7 2 ex1b.c:8 (set (reg/f:DI 75)
>         (symbol_ref:DI ("data") <var_decl 0xb7d35058 data>)) 71
> {movdi_internal} (nil))

You will have to debug CSE.  The actual replacment is done in this loop in
cse_insn:

      /* Terminate loop when replacement made.  This must terminate since
         the current contents will be tested and will always be valid.  */
      while (1)
        {

Adam

Reply via email to