re PR middle-end/35691 (Missed (a == 0) && (b == 0) into (a|(typeof(a)(b)) == 0 when...
authorPrathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
Mon, 7 Nov 2016 17:32:17 +0000 (17:32 +0000)
committerPrathamesh Kulkarni <prathamesh3492@gcc.gnu.org>
Mon, 7 Nov 2016 17:32:17 +0000 (17:32 +0000)
commit7aa13860fb669e459c932e722743b0edfa373071
tree635b4e800f58b4bbd2d72bf49db8fd6309f5bc2d
parent1581a12c3577a2d9048d47b0b7205df772c308db
re PR middle-end/35691 (Missed (a == 0) && (b == 0) into (a|(typeof(a)(b)) == 0 when the types don't match)

2016-11-07  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>

PR middle-end/35691
* match.pd: Add following two patterns:
(x == 0 & y == 0) -> (x | typeof(x)(y)) == 0.
(x != 0 | y != 0) -> (x | typeof(x)(y)) != 0.

testsuite/
* gcc.dg/pr35691-1.c: New test-case.
* gcc.dg/pr35691-4.c: Likewise.

From-SVN: r241915
gcc/ChangeLog
gcc/match.pd
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr35691-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr35691-2.c [new file with mode: 0644]