x = a + b;
y = c + d;
a = e;
z = a + b;
w = b + y;
v = b + c + d;
The two occurences of "a+b" are not common subexpressions because the
value of a may change between the evaluation of the first and second
copies of the expression. On the other hand, the last two expressions,
"b + y" and "b + c + d" can be identified as common subexpressions
even though they are not textually identical because they are guaranteed to produce
identical values.
x = 1 + y; a[y + 1] = a[x] + 1
x := Ewe will assign E's value number to x since future references to x will produce the same value as E.