[Bug tree-optimization/30997] FRE does not value number comparisons in COND_EXPRs

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Feb 28 19:20:00 GMT 2007



------- Comment #1 from pinskia at gcc dot gnu dot org  2007-02-28 19:20 -------
well that is undefined code anyways :)

int foo(int a) { int tmp = a > 2; if (a > 2) return tmp; return 10;}

Note we do simplify this later on after PRE/FRE as we sink the a>2 into the
other basic block and then VRP comes about and finds it is always true.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30997



More information about the Gcc-bugs mailing list