From: Bin Cheng Date: Tue, 15 Sep 2015 02:12:47 +0000 (+0000) Subject: tree-ssa-loop-ivopts.c (get_shiftadd_cost): Strip unnecessary type conversion in... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f468efc59ba95f1e51f2537928caa71f130400ce;p=gcc.git tree-ssa-loop-ivopts.c (get_shiftadd_cost): Strip unnecessary type conversion in op1. * tree-ssa-loop-ivopts.c (get_shiftadd_cost): Strip unnecessary type conversion in op1. From-SVN: r227776 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 328675a87de..16862d057cb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-09-15 Bin Cheng + + * tree-ssa-loop-ivopts.c (get_shiftadd_cost): Strip + unnecessary type conversion in op1. + 2015-09-14 Segher Boessenkool * shrink-wrap.c (requires_stack_frame_p): Fix formatting. diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c index 723a9f7f5bc..ae14e8b7981 100644 --- a/gcc/tree-ssa-loop-ivopts.c +++ b/gcc/tree-ssa-loop-ivopts.c @@ -3889,6 +3889,7 @@ get_shiftadd_cost (tree expr, machine_mode mode, comp_cost cost0, if (!(m >= 0 && m < maxm)) return false; + STRIP_NOPS (op1); mult_in_op1 = operand_equal_p (op1, mult, 0); as_cost = add_cost (speed, mode) + shift_cost (speed, mode, m);