OSDN Git Service

PR tree-optimization/46909
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 14 Dec 2010 14:09:59 +0000 (14:09 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 14 Dec 2010 14:09:59 +0000 (14:09 +0000)
commitad1e8581c43f0c45b5d682540cf9bb9863228102
treee408f2279c770c233318337d4a252ee4b8fb25c6
parent383fbece1fd5dda831d583fe66fb8f065a088646
PR tree-optimization/46909
* gimple-fold.c (and_var_with_comparison_1): Save partial
result even in the is_and case, if both partial results
are the same, return it.
(or_var_with_comparison_1): Use is_or predicate instead of
innercode == TRUTH_OR_EXPR test.  Save partial result
even in the is_or case, if both partial results are the
same, return it.  In the !is_or case when both partial
results are the same, return the partial result instead
of boolean_true_node.

* gcc.c-torture/execute/pr46909-1.c: New test.
* gcc.c-torture/execute/pr46909-2.c: New test.
* gcc.dg/pr46909.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167800 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/gimple-fold.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/pr46909-1.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/pr46909-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr46909.c [new file with mode: 0644]