* [PATCH] Fix thinko (PR tree-optimization/87201).
@ 2018-09-03 11:59 Martin Liška
2018-09-03 13:29 ` Richard Biener
0 siblings, 1 reply; 2+ messages in thread
From: Martin Liška @ 2018-09-03 11:59 UTC (permalink / raw)
To: gcc-patches; +Cc: Richard Biener
[-- Attachment #1: Type: text/plain, Size: 443 bytes --]
Hi.
Thinko fix causing many test-suite failures.
Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
Ready to be installed?
Martin
gcc/ChangeLog:
2018-09-03 Martin Liska <mliska@suse.cz>
PR tree-optimization/87201
* tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
Fix parenthesis in an expression.
---
gcc/tree-switch-conversion.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[-- Attachment #2: 0001-Fix-thinko-PR-tree-optimization-87201.patch --]
[-- Type: text/x-patch, Size: 607 bytes --]
diff --git a/gcc/tree-switch-conversion.c b/gcc/tree-switch-conversion.c
index d7d1c3972a0..ff2c417dc85 100644
--- a/gcc/tree-switch-conversion.c
+++ b/gcc/tree-switch-conversion.c
@@ -1942,8 +1942,8 @@ switch_decision_tree::balance_case_nodes (case_tree_node **head,
/* Skip nodes while their probability does not reach
that amount. */
prob -= (*npp)->m_c->m_prob;
- if (prob.initialized_p ()
- && (prob < pivot_prob || ! (*npp)->m_right))
+ if ((prob.initialized_p () && prob < pivot_prob)
+ || ! (*npp)->m_right)
break;
npp = &(*npp)->m_right;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Fix thinko (PR tree-optimization/87201).
2018-09-03 11:59 [PATCH] Fix thinko (PR tree-optimization/87201) Martin Liška
@ 2018-09-03 13:29 ` Richard Biener
0 siblings, 0 replies; 2+ messages in thread
From: Richard Biener @ 2018-09-03 13:29 UTC (permalink / raw)
To: Martin Liška; +Cc: GCC Patches
On Mon, Sep 3, 2018 at 1:59 PM Martin Liška <mliska@suse.cz> wrote:
>
> Hi.
>
> Thinko fix causing many test-suite failures.
>
> Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
>
> Ready to be installed?
OK.
> Martin
>
> gcc/ChangeLog:
>
> 2018-09-03 Martin Liska <mliska@suse.cz>
>
> PR tree-optimization/87201
> * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
> Fix parenthesis in an expression.
> ---
> gcc/tree-switch-conversion.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-09-03 13:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-03 11:59 [PATCH] Fix thinko (PR tree-optimization/87201) Martin Liška
2018-09-03 13:29 ` Richard Biener
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).