http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52005
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-01-26 22:08:05 UTC --- Here is another testcase: int f(int x, int a, int b) { int t = 0; int c = 1 << a; if (!(x & 1)) t = 0; else if (x & (1 << 2)) t = g(); else t = 0; return t; } The original testcase is not currently optimized with current patch but the above one is. I am still on the case of the original testcase.