blob: 86de8e155ed386f602941ffafbe4739ad466eb27 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
/* { dg-do compile } */
/* { dg-options "-fharden-conditional-branches -fdump-tree-hardcbr -ffat-lto-objects" } */
extern int f1 (void);
extern int f2 (void);
int
f (int i, int j)
{
return (i < j) ? f1 () : f2 ();
}
/* { dg-final { scan-tree-dump-times "Splitting edge" 2 "hardcbr" } } */
/* { dg-final { scan-tree-dump-times "Adding reversed compare" 2 "hardcbr" } } */
/* { dg-final { scan-tree-dump-times "__builtin_trap" 2 "hardcbr" } } */
/* { dg-final { scan-tree-dump-times "if \[(\]i_\[0-9\]*\[(\]D\[)\] < j_\[0-9\]*\[(\]D\[)\]\[)\]" 1 "hardcbr" } } */
/* { dg-final { scan-tree-dump-times "if \[(\]i_\[0-9\]* >= j_\[0-9\]*\[)\]" 2 "hardcbr" } } */
|