re PR middle-end/70920 (if ((intptr_t)ptr == 0) doesn't get simplified to if (ptr...
authorRichard Biener <rguenther@suse.de>
Tue, 26 Jul 2016 13:10:33 +0000 (13:10 +0000)
committerPrathamesh Kulkarni <prathamesh3492@gcc.gnu.org>
Tue, 26 Jul 2016 13:10:33 +0000 (13:10 +0000)
commit8f63caf6826e918678482413161e34b037a13fa7
treeb13c6e8ce4b86039e91187312d3fd3205772dd46
parentc4f820552a06d38c06d1b9d9806052accad88b54
re PR middle-end/70920 (if ((intptr_t)ptr == 0) doesn't get simplified to if (ptr == 0))

2016-07-26  Richard Biener  <rguenther@suse.de>
    Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>

PR middle-end/70920
* match.pd ((intptr)x eq/ne CST to x eq/ne (typeof x) CST): New
pattern.

testsuite/
* gcc.dg/pr70920-1.c: New test-case.
* gcc.dg/pr70902-2.c: Likewise.
* gcc.dg/pr70920-3.c: Likewise.
* gcc.dg/pr70920-4.c: Likewise
* gcc.dg/tree-ssa/ssa-dom-branch-1.c: Change scan-tree-dump-times to
2 instead of 3.

Co-Authored-By: Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
From-SVN: r238754
gcc/ChangeLog
gcc/match.pd
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr70920-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr70920-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr70920-3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr70920-4.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-branch-1.c