diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 1996-10-29 05:54:16 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 1996-10-29 05:54:16 +0000 |
commit | 1a4fa807f16ece6b5e334155f01348139564f9e7 (patch) | |
tree | 2b01d223ffef4cdd6f6c3479c781fd05ffa39769 | |
parent | 6f628f9d4507ed77300b9fe98d25e84756e3dda4 (diff) | |
download | gcc-1a4fa807f16ece6b5e334155f01348139564f9e7.zip gcc-1a4fa807f16ece6b5e334155f01348139564f9e7.tar.gz gcc-1a4fa807f16ece6b5e334155f01348139564f9e7.tar.bz2 |
Add cases for SIGN_EXTEND and ZERO_EXTEND to RTX_COSTS
From-SVN: r13073
-rw-r--r-- | gcc/config/mips/mips.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index 0c96e65b7..624fdf7 100644 --- a/gcc/config/mips/mips.h +++ b/gcc/config/mips/mips.h @@ -3026,7 +3026,24 @@ while (0) else if (mips_cpu == PROCESSOR_R5000) \ return COSTS_N_INSNS (36); \ else \ - return COSTS_N_INSNS (69); + return COSTS_N_INSNS (69); \ + \ + case SIGN_EXTEND: \ + /* A sign extend from SImode to DImode in 64 bit mode is often \ + zero instructions, because the result can often be used \ + directly by another instruction; we'll call it one. */ \ + if (TARGET_64BIT && GET_MODE (X) == DImode \ + && GET_MODE (XEXP (X, 0)) == SImode) \ + return COSTS_N_INSNS (1); \ + else \ + return COSTS_N_INSNS (2); \ + \ + case ZERO_EXTEND: \ + if (TARGET_64BIT && GET_MODE (X) == DImode \ + && GET_MODE (XEXP (X, 0)) == SImode) \ + return COSTS_N_INSNS (2); \ + else \ + return COSTS_N_INSNS (1); /* An expression giving the cost of an addressing mode that contains ADDRESS. If not defined, the cost is computed from the |