(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
tree-ssa/
ifc-8.c
       1  
       2  /* { dg-do compile } */
       3  /* { dg-options "-Ofast -fdump-tree-ifcvt-details-blocks" } */
       4  /* { dg-require-visibility "" } */
       5  
       6  #define LEN 4096
       7   __attribute__((visibility("hidden"), aligned (32))) float array[LEN] = {};
       8  
       9  void test ()
      10  {
      11    for (int i = 0; i < LEN; i++)
      12      {
      13        if (array[i] > (float)0.)
      14  	array[i] = 3;
      15      }
      16  }
      17  
      18  /* { dg-final { scan-tree-dump-times "Applying if-conversion" 1 "ifcvt" } } */
      19  
      20  /* We insert into code
      21     if (LOOP_VECTORIZED (...))
      22     which is folded by vectorizer.  Both outgoing edges must have probability
      23     100% so the resulting profile match after folding.  */
      24  /* { dg-final { scan-tree-dump-times "Invalid sum of outgoing probabilities 200.0" 1 "ifcvt" } } */
      25  /* { dg-final { scan-tree-dump-times "Invalid sum of incoming counts" 1 "ifcvt" } } */