On Wed, Jul 18, 2018 at 4:19 AM Kugan Vivekanandarajah <kugan.vivekanandara...@linaro.org> wrote: > > Attached patch fixes phi-opt not optimizing c++ testcase where we have > > if (b_4(D) == 0) instead of if (b_4(D) != 0) as shown in > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86544 > > Patch bootstrapped and regression tested on x86_64-linux-gnu with no > new regressions. > > Is this OK for trunk?
OK. Richard. > Thanks, > Kugan > > gcc/ChangeLog: > > 2018-07-18 Kugan Vivekanandarajah <kug...@linaro.org> > > PR middle-end/86544 > * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle > comparison with EQ_EXPR > in last stmt. > > gcc/testsuite/ChangeLog: > > 2018-07-18 Kugan Vivekanandarajah <kug...@linaro.org> > > PR middle-end/86544 > * g++.dg/tree-ssa/pr86544.C: New test.