> You generally want CSE, yes? So you can't blame gcc for getting it > wrong sometimes.
There are cases where CSE pessimizes the code, .e.g when it increases memory pressure too much or caches something that is easier recomputed. This is just another one. BTW I checked again and the problem seems to be fixed in gcc 4.6, still there in 4.5, at least in my example. -Andi