[Bug tree-optimization/58915] [missed optimization] GCC fails to get the loop bound for some loops.

congh at google dot com gcc-bugzilla@gcc.gnu.org
Wed Oct 30 23:52:00 GMT 2013


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

--- Comment #2 from Cong Hou <congh at google dot com> ---
I am afraid that get_range_info () has little use here. The value range we care
about may only exist under specific conditions and is hence flow sensitive. For
example, we may need the value range of n in the if body:

if (n > 0)
  if (n < 4)
    /* use of n */

However, n does not have a new name under the condition n>0 && n<4, making it
impossible to get the range (0, 4) from the SSA_NAME of n.



More information about the Gcc-bugs mailing list