https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125442
Kael Franco <kaelfandrew at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kaelfandrew at gmail dot com
--- Comment #4 from Kael Franco <kaelfandrew at gmail dot com> ---
Created attachment 64564
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=64564&action=edit
Another patch
(In reply to Souradipto Das from comment #3)
> I've attached a patch containing a match.pd simplification rule that
> resolves this missed optimization.
I attach another patch, which I haven't sent to [email protected] yet
because make test is taking a while.
I don't think it's necessary to use build_zero_cst
because match.pd has this
(simplify
(mult @0 integer_zerop@1)
@1)
which doesn't use build_zero_cst. See my patch's gcc/match.pd.
Your match.pd and testsuite are missing the (a != 0) & ((a|b) != 0) check. See
my patch's gcc/testsuite/gcc.dg/int-bwise-opt-1.c