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

Re: Combine on IA-64


On Tue, Feb 26, 2002 at 11:19:23PM +0100, Jakub Jelinek wrote:
> ... already in ia64.md, but even if I remove reload_completed from it, it
> still doesn't help, apparently combine needs an real instruction to match.

Nope.  Combine wasn't trying the split with only two input insns.

Fixed thus.

I'll commit to branch and trunk after more thorough testing.


r~


	* combine.c (try_combine): Attempt to split the pattern even
	with only two input instructions.
	* config/ia64/ia64.md: Split symbolic_operand loads any time.

Index: combine.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/combine.c,v
retrieving revision 1.267
diff -c -p -d -r1.267 combine.c
*** combine.c	2002/02/20 23:15:00	1.267
--- combine.c	2002/02/27 02:23:47
*************** try_combine (i3, i2, i1, new_direct_jump
*** 2105,2117 ****
        insn_code_number = recog_for_combine (&newpat, i3, &new_i3_notes);
      }
  
!   /* If we were combining three insns and the result is a simple SET
!      with no ASM_OPERANDS that wasn't recognized, try to split it into two
!      insns.  There are two ways to do this.  It can be split using a
!      machine-specific method (like when you have an addition of a large
!      constant) or by combine in the function find_split_point.  */
  
!   if (i1 && insn_code_number < 0 && GET_CODE (newpat) == SET
        && asm_noperands (newpat) < 0)
      {
        rtx m_split, *split;
--- 2105,2117 ----
        insn_code_number = recog_for_combine (&newpat, i3, &new_i3_notes);
      }
  
!   /* If the result is a simple SET with no ASM_OPERANDS that wasn't
!      recognized, try to split it.  There are two ways to do this.  It
!      can be split using a machine-specific method (like when you have
!      an addition of a large constant) or by combine in the function
!      find_split_point.  */
  
!   if (insn_code_number < 0 && GET_CODE (newpat) == SET
        && asm_noperands (newpat) < 0)
      {
        rtx m_split, *split;
*************** try_combine (i3, i2, i1, new_direct_jump
*** 2175,2181 ****
  	  if (insn_code_number >= 0)
  	    newpat = m_split;
  	}
!       else if (m_split && GET_CODE (m_split) == SEQUENCE
  	       && XVECLEN (m_split, 0) == 2
  	       && (next_real_insn (i2) == i3
  		   || ! use_crosses_set_p (PATTERN (XVECEXP (m_split, 0, 0)),
--- 2175,2181 ----
  	  if (insn_code_number >= 0)
  	    newpat = m_split;
  	}
!       else if (m_split && i1 && GET_CODE (m_split) == SEQUENCE
  	       && XVECLEN (m_split, 0) == 2
  	       && (next_real_insn (i2) == i3
  		   || ! use_crosses_set_p (PATTERN (XVECEXP (m_split, 0, 0)),
*************** try_combine (i3, i2, i1, new_direct_jump
*** 2237,2243 ****
        /* If we can split it and use I2DEST, go ahead and see if that
  	 helps things be recognized.  Verify that none of the registers
  	 are set between I2 and I3.  */
!       if (insn_code_number < 0 && (split = find_split_point (&newpat, i3)) != 0
  #ifdef HAVE_cc0
  	  && GET_CODE (i2dest) == REG
  #endif
--- 2237,2244 ----
        /* If we can split it and use I2DEST, go ahead and see if that
  	 helps things be recognized.  Verify that none of the registers
  	 are set between I2 and I3.  */
!       if (insn_code_number < 0 && i1
! 	  && (split = find_split_point (&newpat, i3)) != 0
  #ifdef HAVE_cc0
  	  && GET_CODE (i2dest) == REG
  #endif
Index: config/ia64/ia64.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/ia64/ia64.md,v
retrieving revision 1.79
diff -c -p -d -r1.79 ia64.md
*** ia64.md	2002/01/17 12:07:57	1.79
--- ia64.md	2002/02/27 02:23:47
***************
*** 438,444 ****
  (define_split
    [(set (match_operand:DI 0 "register_operand" "")
  	(match_operand:DI 1 "symbolic_operand" ""))]
!   "reload_completed && ! TARGET_NO_PIC"
    [(const_int 0)]
    "
  {
--- 438,444 ----
  (define_split
    [(set (match_operand:DI 0 "register_operand" "")
  	(match_operand:DI 1 "symbolic_operand" ""))]
!   "! TARGET_NO_PIC"
    [(const_int 0)]
    "
  {


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