From: Bin Cheng Date: Thu, 11 May 2017 09:10:01 +0000 (+0000) Subject: * rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=86b001e0012c26b3a39a65937ba949e2285fdd77;p=gcc.git * rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes. From-SVN: r247881 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5c3f57940fb..9fe29bd6aa9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2017-05-11 Bin Cheng + + * rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes. + 2017-05-11 Richard Biener * passes.c (execute_function_todo): Verify loops if they are diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c index 321363f9746..d9f57c30d8e 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;