aboutsummaryrefslogtreecommitdiff
path: root/gcc/value-range.cc
diff options
context:
space:
mode:
authorAndrew Pinski <apinski@marvell.com>2023-07-14 09:55:57 -0700
committerAndrew Pinski <apinski@marvell.com>2023-07-16 23:26:59 -0700
commitd20e542ecd8cfc009b120f9e432caeb7005e7c53 (patch)
tree79d065dd61ebd9faf19b84b9950c2db4a3b46e21 /gcc/value-range.cc
parenta5088dc3f5ef73c8740f0b8be3e6ebf6b535f192 (diff)
downloadgcc-d20e542ecd8cfc009b120f9e432caeb7005e7c53.zip
gcc-d20e542ecd8cfc009b120f9e432caeb7005e7c53.tar.gz
gcc-d20e542ecd8cfc009b120f9e432caeb7005e7c53.tar.bz2
Fix PR 110666: `(a != 2) == a` produces wrong code
I had messed up the case where the outer operator is `==`. The check for the resulting should have been `==` and not `!=`. This patch fixes that and adds a full runtime testcase now for all cases to make sure it works. OK? Bootstrapped and tested on x86-64-linux-gnu with no regressions. gcc/ChangeLog: PR tree-optimization/110666 * match.pd (A NEEQ (A NEEQ CST)): Fix Outer EQ case. gcc/testsuite/ChangeLog: PR tree-optimization/110666 * gcc.c-torture/execute/pr110666-1.c: New test.
Diffstat (limited to 'gcc/value-range.cc')
0 files changed, 0 insertions, 0 deletions