Hi,
Following previous patch, this one fixes PR72772 by checking equality for expanded iv base. Richard is fixing the PR by removing degenerate PHI at the first place, but I think this one also catches more cases.
Bootstrap and test on x86_64 and AArch64. Is it OK?
Thanks,
bin
2016-08-02 Bin Cheng <bin.cheng@arm.com>
PR tree-optimization/72772
* tree-ssa-loop-niter.c (loop_exits_before_overflow): Check equality
for expanded base.
gcc/testsuite/ChangeLog
2016-08-02 Bin Cheng <bin.cheng@arm.com>
PR tree-optimization/pr72772
* gcc.dg/tree-ssa/pr72772.c: New test.