re PR rtl-optimization/85376 (wrong code with -Og -fno-dce -fgcse -fno-tree-ccp ...
authorJakub Jelinek <jakub@redhat.com>
Fri, 13 Apr 2018 19:39:11 +0000 (21:39 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 13 Apr 2018 19:39:11 +0000 (21:39 +0200)
commit9b91582429ca0b78f235e3c11b809a861b3d0f19
treee69206619ac279de2033eb72eecaa2dea9038667
parent272277dc55c3dbe52da902101046e9ccc2777710
re PR rtl-optimization/85376 (wrong code with -Og -fno-dce -fgcse -fno-tree-ccp -fno-tree-copy-prop)

PR rtl-optimization/85376
* simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
instead of a specific value.

* gcc.dg/pr85376.c: New test.

From-SVN: r259377
gcc/ChangeLog
gcc/simplify-rtx.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr85376.c [new file with mode: 0644]