aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
authorKamil Dudka <kdudka@redhat.com>2009-08-09 22:43:17 +0200
committerPekka Enberg <penberg@kernel.org>2011-08-28 09:30:24 +0300
commit556cb86326b83b49c2a5e9b0358733cdf8373c7a (patch)
treedb032963fda05cf1377ed62388dbadb37c6d7ae9
parent39109385e367b7194d1b1230db7220c1b1a0dd50 (diff)
downloadsparse-dev-556cb86326b83b49c2a5e9b0358733cdf8373c7a.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: Pekka Enberg <penberg@kernel.org>
-rw-r--r--cse.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/cse.c b/cse.c
index 2a157453..2aabb657 100644
--- a/cse.c
+++ b/cse.c
@@ -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.
*/