This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/84982] [8 Regression] logically inverting bools into local array results in bitwise negation
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 21 Mar 2018 20:21:11 +0000
- Subject: [Bug tree-optimization/84982] [8 Regression] logically inverting bools into local array results in bitwise negation
- Auto-submitted: auto-generated
- References: <bug-84982-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84982
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Wed Mar 21 20:20:40 2018
New Revision: 258742
URL: https://gcc.gnu.org/viewcvs?rev=258742&root=gcc&view=rev
Log:
PR tree-optimization/84982
* gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
by flipping the least significant bit rather than all bits from
bitpos to bitpos + bitsize - 1.
* c-c++-common/pr84982.c: New test.
Added:
trunk/gcc/testsuite/c-c++-common/pr84982.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/gimple-ssa-store-merging.c
trunk/gcc/testsuite/ChangeLog