diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-01-18 19:47:16 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-01-18 19:47:16 +0000 |
commit | 4f87bd68d2e70bb06e350c16b9ada67c24075380 (patch) | |
tree | d39d6d56ed7796b26c42b4c0d68518a4491b59a3 /gcc/testsuite/gcc.dg/tree-ssa/vrp24.c | |
parent | 1e8e992020adfba209ef30b3c369e2ca6282d837 (diff) | |
download | gcc-4f87bd68d2e70bb06e350c16b9ada67c24075380.tar.gz |
* tree-vrp.c (test_for_singularity): Correct test for new
min limit. Use operand_equal_p rather than pointer equality
for testing if new min/max values are equal.
* tree-ssa-propagate.c (substitute_and_fold): Delay simplifications
using range information until after propagation and folding.
* gcc.c-torture/execute/930529-1.x: Use -fwrapv as test depends
on wrapping on overflow semantics.
* gcc.dg/tree-ssa/pr23109.c: Remove the .lim file too.
* gcc.gc/tree-ssa/vrp23.c: New test.
* gcc.gc/tree-ssa/vrp24.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@109904 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/tree-ssa/vrp24.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/vrp24.c | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp24.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp24.c new file mode 100644 index 00000000000..3be7efa4707 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp24.c @@ -0,0 +1,89 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-vrp-details" } */ + + +struct rtx_def; +typedef struct rtx_def *rtx; +union rtunion_def +{ + rtx rt_rtx; +}; +typedef union rtunion_def rtunion; +struct rtx_def +{ + int code; + union u + { + rtunion fld[1]; + } u; +}; + +sss (rtx insn, int code1, int code2, int code3) +{ + _Bool D1562; + struct rtx_def * body; + int i; + int n_sets; + int D1544; + + body = insn->u.fld[5].rt_rtx; + D1544 = body->code; + n_sets = 1; + if (D1544 == 55) goto L7; else goto L1; + +L1: + n_sets = 0; + if (code3 == 99) goto L2; else goto L11; + +L2: + D1562 = code1 == 10; + n_sets = (int) D1562; + if (n_sets > 0) goto L7; else goto L11; + +L37: + if (code2 == 42) goto L8; else goto L9; + +L8: + arf (); + +L9: + i = i + 1; + if (i < n_sets) goto L37; else goto L32; + +L32: + +L11: + if (n_sets > 1) goto L12; else goto L15; + +L12: + nit (); + +L14: + i = 0; + goto L38; + +L15: + if (n_sets > 0) goto L14; else goto L16; + +L38: + frob (); + i = i + 1; + if (n_sets > i) goto L38; else goto L16; + +L16: + return; + +L7: + i = 0; + goto L37; + +} + + + +/* The n_sets > 0 test can be simplified into n_sets == 1 since the + only way to reach the test is when n_sets <= 1, and the only value + which satisfies both conditions is n_sets == 1. */ +/* { dg-final { scan-tree-dump-times "Simplified relational" 1 "vrp" } } */ +/* { dg-final { cleanup-tree-dump "vrp" } } */ + |