use local range for one more pattern in match.pd
For "get_global_range_query" SSA_NAME_RANGE_INFO can be queried. For "get_range_query", it could get more context-aware range info. And look at the implementation of "get_range_query", it returns global range if no local fun info. ATTRIBUTE_RETURNS_NONNULL inline range_query * get_range_query (const struct function *fun) { return (fun && fun->x_range_query) ? fun->x_range_query : &global_ranges; } So, using "get_range_query" would cover more case. For example, the test case of "pr111303.c". PR middle-end/111303 gcc/ChangeLog: * match.pd ((t * 2) / 2): Update pattern. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/pr111303.c: New test.
Loading
Please register or sign in to comment