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]

PATCH: emit_move_insn - remove redundant test


The code in emit_move_insn checks if the mode is BLKmode twice, which
is redundant.

tx
emit_move_insn (x, y)
     rtx x, y;
{
  enum machine_mode mode = GET_MODE (x);
  rtx y_cst = NULL_RTX;
  rtx last_insn;

  x = protect_from_queue (x, 1);
  y = protect_from_queue (y, 0);

  if (mode == BLKmode || (GET_MODE (y) != mode && GET_MODE (y) != VOIDmode))
    abort ();
...
  if (mode == BLKmode)
    abort ();

Here is a patch:

Wed Apr 11 16:53:11 PDT 2001  Toshiyasu Morita  (toshiyasu.morita@hsa.hitachi.com)

	* expr.c (emit_move_insn): Remove redundant mode == BLKmode test.

*** expr.c.bak2	Wed Apr 11 15:51:19 2001
--- expr.c	Wed Apr 11 15:51:32 2001
***************
*** 2752,2760 ****
  	      && CONSTANT_ADDRESS_P (XEXP (y, 0)))))
      y = change_address (y, VOIDmode, XEXP (y, 0));
  
-   if (mode == BLKmode)
-     abort ();
- 
    last_insn = emit_move_insn_1 (x, y);
  
    if (y_cst && GET_CODE (x) == REG)
--- 2752,2757 ----





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