tccgen.c: Optimise 0<<x, 0>>x, -1>>x, x&0, x*0, x|-1, x%1.
commitac70e6b84040dc24a065013cdf30ff44d98cc670
authorEdmund Grimley Evans <Edmund.Grimley.Evans@gmail.com>
Sat, 7 Mar 2015 11:25:27 +0000 (7 11:25 +0000)
committerEdmund Grimley Evans <Edmund.Grimley.Evans@gmail.com>
Sat, 7 Mar 2015 17:32:39 +0000 (7 17:32 +0000)
treec3a6654bda699e940172a64a04d0f9bb5d0bcb6b
parent916339347642b7b22d3cfa18bf5058ffbfe74679
tccgen.c: Optimise  0<<x, 0>>x, -1>>x, x&0, x*0, x|-1, x%1.

More precisely, treat (0 << x) and so on as constant expressions, but
not if const_wanted as we do not want to allow "case (x*0):", ...

Do not optimise (0 / x) and (0 % x) here as x might be zero, though
for an architecture that does not generate an exception for division
by zero the back end might choose to optimise those.
tccgen.c