http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31531
--- Comment #10 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-02-13 00:44:11 UTC --- I have a patch which adds this optimization to fold. And a partial patch which adds some of it to forwprop but that fails because we have to create a temp variable.