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]

Re: This code runs *very* slowly


Oops.  Try this patch instead.  Have to be more careful about
when new temporaries are or are not created.


r~



Index: config/alpha/alpha.md
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/alpha/alpha.md,v
retrieving revision 1.55
retrieving revision 1.57
diff -c -p -d -r1.55 -r1.57
*** alpha.md	1998/09/19 12:14:35	1.55
--- alpha.md	1998/11/05 04:04:04	1.57
***************
*** 426,435 ****
  		 (match_operand:SI 2 "add_operand" "")))]
    ""
    "
! { emit_insn (gen_rtx_SET (VOIDmode, gen_lowpart (DImode, operands[0]),
! 			  gen_rtx_PLUS (DImode,
! 					gen_lowpart (DImode, operands[1]),
! 					gen_lowpart (DImode, operands[2]))));
    DONE;
  } ")
  
--- 426,443 ----
  		 (match_operand:SI 2 "add_operand" "")))]
    ""
    "
! {
!   rtx op1 = gen_lowpart (DImode, operands[1]);
!   rtx op2 = gen_lowpart (DImode, operands[2]);
! 
!   if (! cse_not_expected)
!     {
!       rtx tmp = gen_reg_rtx (DImode);
!       emit_insn (gen_adddi3 (tmp, op1, op2));
!       emit_move_insn (operands[0], gen_lowpart (SImode, tmp));
!     }
!   else
!     emit_insn (gen_adddi3 (gen_lowpart (DImode, operands[0]), op1, op2));
    DONE;
  } ")
  
***************
*** 712,721 ****
  		  (match_operand:SI 2 "reg_or_8bit_operand" "")))]
    ""
    "
! { emit_insn (gen_rtx_SET (VOIDmode, gen_lowpart (DImode, operands[0]),
! 			  gen_rtx_MINUS (DImode,
! 					 gen_lowpart (DImode, operands[1]),
! 					 gen_lowpart (DImode, operands[2]))));
    DONE;
  } ")
  
--- 720,737 ----
  		  (match_operand:SI 2 "reg_or_8bit_operand" "")))]
    ""
    "
! {
!   rtx op1 = gen_lowpart (DImode, operands[1]);
!   rtx op2 = gen_lowpart (DImode, operands[2]);
! 
!   if (! cse_not_expected)
!     {
!       rtx tmp = gen_reg_rtx (DImode);
!       emit_insn (gen_subdi3 (tmp, op1, op2));
!       emit_move_insn (operands[0], gen_lowpart (SImode, tmp));
!     }
!   else
!     emit_insn (gen_subdi3 (gen_lowpart (DImode, operands[0]), op1, op2));
    DONE;
  } ")
  


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