public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-2545] Fix optimize_mask_stores profile update
@ 2023-07-16 21:55 Jan Hubicka
  0 siblings, 0 replies; only message in thread
From: Jan Hubicka @ 2023-07-16 21:55 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:c62791fa413a49fc6476ce186b324250f8ae6d40

commit r14-2545-gc62791fa413a49fc6476ce186b324250f8ae6d40
Author: Jan Hubicka <jh@suse.cz>
Date:   Sun Jul 16 23:55:14 2023 +0200

    Fix optimize_mask_stores profile update
    
    While looking into sphinx3 regression I noticed that vectorizer produces
    BBs with overall probability count 120%.  This patch fixes it.
    Richi, I don't know how to create a testcase, but having one would
    be nice.
    
    Bootstrapped/regtested x86_64-linux, will commit it shortly.
    
    gcc/ChangeLog:
    
            PR tree-optimization/110649
            * tree-vect-loop.cc (optimize_mask_stores): Set correctly
            probability of the if-then-else construct.

Diff:
---
 gcc/tree-vect-loop.cc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc
index 7d917bfd72c..61343eadee5 100644
--- a/gcc/tree-vect-loop.cc
+++ b/gcc/tree-vect-loop.cc
@@ -11680,6 +11680,7 @@ optimize_mask_stores (class loop *loop)
       efalse = make_edge (bb, store_bb, EDGE_FALSE_VALUE);
       /* Put STORE_BB to likely part.  */
       efalse->probability = profile_probability::unlikely ();
+      e->probability = efalse->probability.invert ();
       store_bb->count = efalse->count ();
       make_single_succ_edge (store_bb, join_bb, EDGE_FALLTHRU);
       if (dom_info_available_p (CDI_DOMINATORS))

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-07-16 21:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-16 21:55 [gcc r14-2545] Fix optimize_mask_stores profile update Jan Hubicka

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).