This is the mail archive of the 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]

Re: Correct mode shrinkage of set destination by reload_cse_simplify_set

  In message <>you write:
  > The enclosed patch corrects a FAIL observed in the testcase 921029.c
  > when built with "-O3 -fPIC" with hppa1.1 hpux10.20.  The mode for the
  > following insn shrinks from DImode to SImode in the postreload pass:
  > (set (reg/f:DI 24 %r24 [103])
  >      (mem/f:DI (reg/f:SI 20 %r20 [102]) 4))
  > to
  > (set (reg:SI 24 %r24 [103])
  >      (const_int 0 [0x0]))
  > I have added a check to test whether word_mode is wider than the current
  > destination mode.
  > Bootstrap checked under i686 linux and hpux 10.20.  OK to install branch
  > and main?
  > Dave
  > -- 
  > J. David Anglin                        
  > National Research Council of Canada              (613) 990-0752 (FAX: 952-6
  > 605)
  > 2001-03-08  John David Anglin  <>
  > 	* reload1.c (reload_cse_simplify_set): Change insn destination to
  > 	word_mode only if word_mode is wider than the original mode.
Thanks.  I'm making a few refinements.

First, the way we usually deal with this is to see if the src/dst of the
load is smaller than BITS_PER_WORD.  Basically the same as checking word_mode,
but I feel it's clearer to be consistent with the other checks.

Second, we shouldn't apply this change if extend_op is NIL.  ie, there may
be cases where the extension doesn't happen.

I'm bootstrapping the revised patch now on a few machines which define


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