This is the mail archive of the gcc@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: Deep CSE bug!


> -----Original Message-----
> From: gcc-owner On Behalf Of Dave Korn
> Sent: 17 June 2004 12:20
> To: gcc
> Subject: Deep CSE bug!
> 

>   So I guess my question for anyone who's on first-name terms 
> with the CSE machinery is, given this insn
> 
> (insn 33 32 37 0 0x1002f510 (set (subreg:SI (reg:DI 80) 4)
>         (reg/v:SI 75)) 22 {movsi} (nil)
>     (expr_list:REG_EQUAL (const_double -1 [0xffffffff] 0 
> [0x0] 0 [0x0] 0 [0x0] 0 [0x0] 0 [0x0])
>         (nil)))
> 
> is it valid that src_eqv is
> 
> (const_double -1 [0xffffffff] 0 [0x0] 0 [0x0] 0 [0x0] 0 [0x0] 0 [0x0])

...or I suppose I should wonder if the REG_EQUAL note is a valid thing to
attach to the SImode subreg rather than the DImode reg?

  Just to save anyone asking, here's an extract of the code that sets
src_eqv.

  /* Store the equivalent value in SRC_EQV, if different, or if the DEST
     is a STRICT_LOW_PART.  The latter condition is necessary because
SRC_EQV
     is handled specially for this case, and if it isn't set, then there
will
     be no equivalence for the destination.  */
  if (n_sets == 1 && REG_NOTES (insn) != 0
      && (tem = find_reg_note (insn, REG_EQUAL, NULL_RTX)) != 0
      && (! rtx_equal_p (XEXP (tem, 0), SET_SRC (sets[0].rtl))
	  || GET_CODE (SET_DEST (sets[0].rtl)) == STRICT_LOW_PART))
    {
      src_eqv = fold_rtx (canon_reg (XEXP (tem, 0), NULL_RTX), insn);
      XEXP (tem, 0) = src_eqv;
    }

  So maybe the answer is that canon_reg should be passed the insn as well as
the note and should know which word to extract from the const double when
the dest of a set insn is a subreg?


    cheers, 
      DaveK
-- 
Can't think of a witty .sigline today....


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