diff options
author | Bin Cheng <bin.cheng@arm.com> | 2017-05-11 09:10:01 +0000 |
---|---|---|
committer | Bin Cheng <amker@gcc.gnu.org> | 2017-05-11 09:10:01 +0000 |
commit | 86b001e0012c26b3a39a65937ba949e2285fdd77 (patch) | |
tree | efe627d8faa680ec7dd9c0eda14615bc695295d5 /gcc | |
parent | e81c832812e5432cb849146ca44ed64727e672af (diff) | |
download | gcc-86b001e0012c26b3a39a65937ba949e2285fdd77.zip gcc-86b001e0012c26b3a39a65937ba949e2285fdd77.tar.gz gcc-86b001e0012c26b3a39a65937ba949e2285fdd77.tar.bz2 |
* rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes.
From-SVN: r247881
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/rtlanal.c | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5c3f579..9fe29bd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2017-05-11 Bin Cheng <bin.cheng@arm.com> + + * rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes. + 2017-05-11 Richard Biener <rguenther@suse.de> * passes.c (execute_function_todo): Verify loops if they are diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c index 321363f..d9f57c3 100644 --- a/gcc/rtlanal.c +++ b/gcc/rtlanal.c @@ -4164,6 +4164,13 @@ rtx_cost (rtx x, machine_mode mode, enum rtx_code outer_code, return COSTS_N_INSNS (2 + factor); break; + case TRUNCATE: + if (MODES_TIEABLE_P (mode, GET_MODE (XEXP (x, 0)))) + { + total = 0; + break; + } + /* FALLTHRU */ default: if (targetm.rtx_costs (x, mode, outer_code, opno, &total, speed)) return total; |