On Tue, Apr 18, 2017 at 12:47 PM, Bin Cheng <bin.ch...@arm.com> wrote: > Hi, > Currently we only support compare iv_use if the other side of comparison is > loop invariant. > Such compare iv_use can never be eliminated, but it still can be expressed. > This patch > supports the case that the other side of comparison is an arbitrary non-iv > variables. > Is it OK?
Ok. Thanks, Richard. > Thanks, > bin > > 2017-04-11 Bin Cheng <bin.ch...@arm.com> > > * tree-ssa-loop-ivopts.c (enum comp_iv_rewrite): New. > (extract_cond_operands): Detect condition comparing against non- > invariant bound and return appropriate enum value. > (find_interesting_uses_cond): Update use of extract_cond_operands. > Handle its return value accordingly. > (determine_group_iv_cost_cond, rewrite_use_compare): Ditto.