unsigned foo (unsigned a, unsigned b) { return (b - a) + a; } should be simplified to return b. Later GIMPLE reassoc and forwprop do that job.
Trunk optimizes it to return b now, so I guess fixed.