comparison gcc/testsuite/gcc.dg/tree-ssa/minmax-2.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children 1830386684a0
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 /* { dg-do compile } */
2 /* { dg-options "-O -fstrict-overflow -fdump-tree-optimized" } */
3 /* { dg-add-options c99_runtime } */
4 /* { dg-require-effective-target c99_runtime } */
5
6 static int max(int a,int b){return (a<b)?b:a;}
7 int f(int x,int y){return max(-x,-y);}
8 int g(int x,int y){return max(~x,~y);}
9 double h(double x,double y){return __builtin_fmax(-x,-y);}
10
11 /* { dg-final { scan-tree-dump-times "MIN_EXPR" 2 "optimized" } } */
12 /* { dg-final { scan-tree-dump "__builtin_fmin" "optimized" } } */