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

combine.c patch


While browsing combine.c I noticed the following, where SUBREG_REG
was not being applied to a SUBREG as it should be.

In this part of code, both op0 and op1 are of the form:

   (ADD:m (SUBREG:m (...)) (CONST_INT ...))

In both cases inner_op0 and inner_op1 are the (SUBREG:m (...)) part
that SUBREG_REG can validly be applied to.

This change causes no regressions on the i386 platform.

   Alasdair.



Sun Jun 28 20:59:35 BST 1998	Alasdair Baird	<alasdair@wildcat.demon.co.uk>

	* combine.c (simplify_comparison): Apply SUBREG_REG to SUBREGs.


*** combine.c.orig	Sun Jun 28 16:27:30 1998
--- combine.c	Sun Jun 28 16:29:19 1998
***************
*** 9481,9490 ****
  		  > GET_MODE_SIZE (GET_MODE (SUBREG_REG (inner_op0))))
  	      && (GET_MODE (SUBREG_REG (inner_op0))
  		  == GET_MODE (SUBREG_REG (inner_op1)))
! 	      && (GET_MODE_BITSIZE (GET_MODE (SUBREG_REG (op0)))
  		  <= HOST_BITS_PER_WIDE_INT)
  	      && (0 == ((~c0) & nonzero_bits (SUBREG_REG (inner_op0),
! 					     GET_MODE (SUBREG_REG (op0)))))
  	      && (0 == ((~c1) & nonzero_bits (SUBREG_REG (inner_op1),
  					     GET_MODE (SUBREG_REG (inner_op1))))))
  	    {
--- 9481,9490 ----
  		  > GET_MODE_SIZE (GET_MODE (SUBREG_REG (inner_op0))))
  	      && (GET_MODE (SUBREG_REG (inner_op0))
  		  == GET_MODE (SUBREG_REG (inner_op1)))
! 	      && (GET_MODE_BITSIZE (GET_MODE (SUBREG_REG (inner_op0)))
  		  <= HOST_BITS_PER_WIDE_INT)
  	      && (0 == ((~c0) & nonzero_bits (SUBREG_REG (inner_op0),
! 					     GET_MODE (SUBREG_REG (inner_op0)))))
  	      && (0 == ((~c1) & nonzero_bits (SUBREG_REG (inner_op1),
  					     GET_MODE (SUBREG_REG (inner_op1))))))
  	    {



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