diff options
author | Kamil Dudka <kdudka@redhat.com> | 2009-08-09 22:43:17 +0200 |
---|---|---|
committer | Christopher Li <sparse@chrisli.org> | 2011-08-27 23:27:35 -0700 |
commit | 31dc25301b584f8d938629f9a68c5db83ec6241b (patch) | |
tree | 7437f8e0a9164b7a92e1e238c80574e0c3cb6e25 /cse.c | |
parent | 8376ab091a5ab1850797fd203f31ae97a1287b23 (diff) | |
download | sparse-31dc25301b584f8d938629f9a68c5db83ec6241b.tar.gz |
cse: treat PHI-nodes as other instructions
Without this patch test-linearize fails on a simple example:
static void test(int i)
{
while (i) {
if (i)
test(0);
i++;
}
}
It generates a conditional jump depending on an uninitialized value
which is obviously not in the input code.
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
Signed-off-by: Christopher Li <sparse@chrisli.org>
Diffstat (limited to 'cse.c')
-rw-r--r-- | cse.c | 7 |
1 files changed, 0 insertions, 7 deletions
@@ -317,13 +317,6 @@ static struct instruction * try_to_cse(struct entrypoint *ep, struct instruction b2 = i2->bb; /* - * PHI-nodes do not care where they are - the only thing that matters - * are the PHI _sources_. - */ - if (i1->opcode == OP_PHI) - return cse_one_instruction(i1, i2); - - /* * Currently we only handle the uninteresting degenerate case where * the CSE is inside one basic-block. */ |