view gcc/testsuite/g++.dg/predict-2.C @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents
children
line wrap: on
line source

/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-profile_estimate -std=c++11" } */

int a, b, c;

void
bar()
{
  if (a == 123)
    [[likely]] c = 5;
  else
    c = 5;
}

/* { dg-final { scan-tree-dump "first match heuristics: 90.00%" "profile_estimate"} } */
/* { dg-final { scan-tree-dump "hot label heuristics of edge .*->.*: 90.00%" "profile_estimate"} } */