From f468efc59ba95f1e51f2537928caa71f130400ce Mon Sep 17 00:00:00 2001 From: Bin Cheng Date: Tue, 15 Sep 2015 02:12:47 +0000 Subject: [PATCH] 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 --- gcc/ChangeLog | 5 +++++ gcc/tree-ssa-loop-ivopts.c | 1 + 2 files changed, 6 insertions(+) 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); -- 2.30.2