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]
Other format: [Raw text]

optimization/7702: [PATCH] Make reload-cse honor CANNOT_CHANGE_MODE_CLASS

The following reply was made to PR optimization/7702; it has been noted by GNATS.

From: Falk Hueffner <>
Subject: optimization/7702: [PATCH] Make reload-cse honor CANNOT_CHANGE_MODE_CLASS
Date: 14 Feb 2003 10:25:54 +0100

 This fixes PR 7702 and a miscompilation of openssh on Alpha ev6 (sshd
 wouldn't accept ssh2 connections). The CSE in reload wants to merge
 registers with equal content and widen them to word_mode while at it,
 but doesn't honor CANNOT_CHANGE_MODE_CLASS. When the register
 allocator is foolish enough to put two identical integer constants
 into floating point registers, this fails.
 Because of this dependency on the register allocator, the problem is
 very hard to isolate, both test cases work with mainline. However,
 doing an equivalent patch for 3.2 fixes the problem. Because of the
 ssh miscompilation, it would be nice if it could also be included on
 older branches.
 2003-02-14  Falk Hueffner  <>
         PR optimization/7702
 	* reload1.c (reload_cse_simplify_set): Honor
 Content-Type: text/x-patch
 Content-Disposition: attachment; filename=reload1.patch
 Index: reload1.c
 RCS file: /cvs/gcc/gcc/gcc/reload1.c,v
 retrieving revision 1.378
 diff -u -r1.378 reload1.c
 --- reload1.c	11 Feb 2003 03:52:28 -0000	1.378
 +++ reload1.c	13 Feb 2003 21:39:16 -0000
 @@ -8282,7 +8282,13 @@
 -	      && extend_op != NIL)
 +	      && extend_op != NIL
 +					    word_mode,
 +					    REGNO_REG_CLASS (REGNO (SET_DEST (set))))
 +	      )
  	      rtx wide_dest = gen_rtx_REG (word_mode, REGNO (SET_DEST (set)));
  	      ORIGINAL_REGNO (wide_dest) = ORIGINAL_REGNO (SET_DEST (set));

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