This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/71654] [6/7 Regression] missing VRP optimization on c++ unsigned char and short expressions
- From: "ppalka at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 12 Aug 2016 16:08:12 +0000
- Subject: [Bug middle-end/71654] [6/7 Regression] missing VRP optimization on c++ unsigned char and short expressions
- Authentication-results: sourceware.org; auth=none
- Auto-submitted: auto-generated
- References: <bug-71654-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71654
--- Comment #4 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Author: ppalka
Date: Fri Aug 12 16:07:40 2016
New Revision: 239421
URL: https://gcc.gnu.org/viewcvs?rev=239421&root=gcc&view=rev
Log:
Fix PR middle-end/71654 (missed shortening of a compare)
gcc/ChangeLog:
PR middle-end/71654
* match.pd ((T)A CMP (T)B -> A CMP B): Allow (T)A to be a
sign-changing cast from a shorter unsigned type to a wider
signed type.
gcc/testsuite/ChangeLog:
PR middle-end/71654
* gcc.dg/c-c++-common/pr71654.c: New test.
* gcc.dg/tree-ssa/vrp23: Add -fno-tree-forwprop to
dg-options.
* gcc.dg/tree-ssa/vrp24: Likewise.
Added:
trunk/gcc/testsuite/c-c++-common/pr71654.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/match.pd
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/tree-ssa/vrp23.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/vrp24.c