This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PR86544] Fix Popcount detection generates different code on C and C++


On Wed, Jul 18, 2018 at 4:19 AM Kugan Vivekanandarajah
<kugan.vivekanandarajah@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  <kuganv@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  <kuganv@linaro.org>
>
>     PR middle-end/86544
>     * g++.dg/tree-ssa/pr86544.C: New test.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]