diff options
author | mpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-04-20 12:48:37 +0000 |
---|---|---|
committer | mpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-04-20 12:48:37 +0000 |
commit | 975622775db8b8202728988f5e6be813a29eba90 (patch) | |
tree | 681a0c258f50da188883800e5499c6a47fc4213f | |
parent | 53a044ce77ef7d4218ef17fdb8422d954f902ee1 (diff) | |
download | gcc-975622775db8b8202728988f5e6be813a29eba90.tar.gz |
* tree-if-conv.c (is_false_predicate): For NULL_TREE return false
rather than true.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-6-branch@235273 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/tree-if-conv.c | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ac995d9a87f..6c40319038d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2016-04-20 Marek Polacek <polacek@redhat.com> + * tree-if-conv.c (is_false_predicate): For NULL_TREE return false + rather than true. + +2016-04-20 Marek Polacek <polacek@redhat.com> + PR tree-optimization/70725 * tree-if-conv.c (is_false_predicate): New function. (predicate_mem_writes): Use it. diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c index a9fbab94a19..72e808ef883 100644 --- a/gcc/tree-if-conv.c +++ b/gcc/tree-if-conv.c @@ -267,9 +267,9 @@ ifc_temp_var (tree type, tree expr, gimple_stmt_iterator *gsi) static inline bool is_false_predicate (tree cond) { - return (cond == NULL_TREE - || cond == boolean_false_node - || integer_zerop (cond)); + return (cond != NULL_TREE + && (cond == boolean_false_node + || integer_zerop (cond))); } /* Return true when COND is a true predicate. */ |