diff options
author | Bin Cheng <bin.cheng@arm.com> | 2017-05-02 15:57:45 +0000 |
---|---|---|
committer | Bin Cheng <amker@gcc.gnu.org> | 2017-05-02 15:57:45 +0000 |
commit | 53685896151d0ec0685ad73ab447c16cf5fd7f03 (patch) | |
tree | e0155b158fe08efc0e62ef246d45524d3667ad09 /gcc/rtlanal.c | |
parent | 27c72a9bfd75deb3921327e6069fb2b426a91fec (diff) | |
download | gcc-53685896151d0ec0685ad73ab447c16cf5fd7f03.zip gcc-53685896151d0ec0685ad73ab447c16cf5fd7f03.tar.gz gcc-53685896151d0ec0685ad73ab447c16cf5fd7f03.tar.bz2 |
* rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes.
From-SVN: r247509
Diffstat (limited to 'gcc/rtlanal.c')
-rw-r--r-- | gcc/rtlanal.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c index 321363f..f18245f 100644 --- a/gcc/rtlanal.c +++ b/gcc/rtlanal.c @@ -4164,6 +4164,14 @@ rtx_cost (rtx x, machine_mode mode, enum rtx_code outer_code, return COSTS_N_INSNS (2 + factor); break; + case TRUNCATE: + /* If we can tie these modes, make this cheap. */ + if (MODES_TIEABLE_P (mode, GET_MODE (SUBREG_REG (x)))) + { + total = 0; + break; + } + /* FALLTHRU */ default: if (targetm.rtx_costs (x, mode, outer_code, opno, &total, speed)) return total; |