diff options
author | Andrew Pinski <apinski@marvell.com> | 2023-07-14 09:55:57 -0700 |
---|---|---|
committer | Andrew Pinski <apinski@marvell.com> | 2023-07-16 23:26:59 -0700 |
commit | d20e542ecd8cfc009b120f9e432caeb7005e7c53 (patch) | |
tree | 79d065dd61ebd9faf19b84b9950c2db4a3b46e21 /gcc/value-range.cc | |
parent | a5088dc3f5ef73c8740f0b8be3e6ebf6b535f192 (diff) | |
download | gcc-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