https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64713
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Here is a testcase which shows one of the issues with removing the optimization inside expand: int foo_c (int a, int b) { if (a > 9 && b < 34) return 4; else return 26; } if the code was: int foo_c (int a, int b, int c, int d) { if (a > 9 && b < 34) return c; else return d; } --- CUT --- We would optimize out the cset.