diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-05-13 20:55:06 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-05-13 20:55:06 +0000 |
commit | f5c8cff568cfcc9b5eee9c9995ca6b11e7d2d61d (patch) | |
tree | 530fd846bdc26aea8b21becd4c83cfefd837112e /gcc/testsuite/gcc.dg/tree-ssa/20040513-1.c | |
parent | 650c540cc51bc0bbe53935387b76d4b495f20427 (diff) | |
download | gcc-f5c8cff568cfcc9b5eee9c9995ca6b11e7d2d61d.tar.gz |
* tree-ssa-forwprop.c (record_single_argument_cond_exprs): Accept
new parameters for the statement and variable worklist as well
as a bitmap of interesting SSA_NAMEs. Walk over the statement
worklist recording interesting variables in the variable worklist
and bitmap. Handle casts between integral and boolean types.
(substitute_single_use_vars): Accept new parameters for the statement
and variable worklist. When a substitution is made add a new
entry to the statement worklist. Handle casts between integral
and boolean types.
(tree_ssa_forward_propagate_single_use_vars): Rework to pass
worklists to children. Iterate until the statement worklist
is empty.
* gcc.dg/tree-ssa/20040513-1.c: New test.
* gcc.dg/tree-ssa/20040513-2.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81803 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/tree-ssa/20040513-1.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/20040513-1.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20040513-1.c b/gcc/testsuite/gcc.dg/tree-ssa/20040513-1.c new file mode 100644 index 00000000000..d53d81849fd --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/20040513-1.c @@ -0,0 +1,18 @@ +/* { dg-do compile } */ +/* { dg-options "-O1 -fdump-tree-forwprop1" } */ +void bar (void); + +void +foo (unsigned int a) +{ + if ((a >> 5) & 1) + bar (); +} + + + +/* There should be no casts to a _Bool since we can use the temporary + holding (a>>5)&1 directly. */ +/* { dg-final { scan-tree-dump-times "\\(_Bool\\)" 0 "forwprop1"} } */ + + |