aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/pr101024-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/tree-ssa/pr101024-1.c')
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr101024-1.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr101024-1.c b/gcc/testsuite/gcc.dg/tree-ssa/pr101024-1.c
new file mode 100644
index 0000000..14379bf
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr101024-1.c
@@ -0,0 +1,39 @@
+/* PR tree-optimization/95699 */
+/* PR tree-optimization/101024 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized -fdump-tree-phiopt1" } */
+unsigned long long
+f2 (unsigned long long x)
+{
+ if (x < 0x8000000000000000ULL)
+ x = 0x8000000000000000ULL;
+ else
+ {
+ if (x >= 0x8000000000000023ULL)
+ x = 0x8000000000000023ULL;
+ }
+ return x;
+}
+unsigned long long
+f1 (unsigned long long x)
+{
+ if (x >= 100)
+ {
+ if (x >= 0x8000000000000000ULL)
+ x = 0x8000000000000000ULL;
+ }
+ else
+ x = 100;
+ return x;
+}
+/* f2: */
+/* { dg-final { scan-tree-dump "MIN_EXPR <\[^>\n\r]*9223372036854775843>" "optimized" } } */
+/* { dg-final { scan-tree-dump "MAX_EXPR <\[^>\n\r]*9223372036854775808>" "optimized" } } */
+/* { dg-final { scan-tree-dump "MIN_EXPR <\[^>\n\r]*9223372036854775843>" "phiopt1" } } */
+/* { dg-final { scan-tree-dump "MAX_EXPR <\[^>\n\r]*9223372036854775808>" "phiopt1" } } */
+
+/* f1: */
+/* { dg-final { scan-tree-dump "MIN_EXPR <\[^>\n\r]*9223372036854775808>" "optimized" } } */
+/* { dg-final { scan-tree-dump "MAX_EXPR <\[^>\n\r]*100>" "optimized" } } */
+/* { dg-final { scan-tree-dump "MIN_EXPR <\[^>\n\r]*9223372036854775808>" "phiopt1" } } */
+/* { dg-final { scan-tree-dump "MAX_EXPR <\[^>\n\r]*100>" "phiopt1" } } */