Skip to content
Snippets Groups Projects
Commit 55b22a6f authored by Jiufu Guo's avatar Jiufu Guo Committed by guojiufu
Browse files

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.
parent 5b4acfa3
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment