tree-optimization/94234 - add pattern for ptr-diff on addresses with same offset
authorFeng Xue <fxue@os.amperecomputing.com>
Mon, 1 Jun 2020 03:57:35 +0000 (11:57 +0800)
committerFeng Xue <fxue@os.amperecomputing.com>
Wed, 19 Aug 2020 14:29:45 +0000 (22:29 +0800)
commit459f6f68a75fe88e7c8309ca8ad3244a532b0d8e
treefc36d4822d9d4058a653fa7eeea7f1af3148e9b8
parent1e235788bbfc41f3eec1bb665d8e4bb2c63a1982
tree-optimization/94234 - add pattern for ptr-diff on addresses with same offset

2020-08-19  Feng Xue  <fxue@os.amperecomputing.com>

gcc/
PR tree-optimization/94234
* match.pd ((PTR_A + OFF) - (PTR_B + OFF)) -> (PTR_A - PTR_B): New
simplification.

gcc/testsuite/
PR tree-optimization/94234
* gcc.dg/pr94234-1.c: New test.
gcc/match.pd
gcc/testsuite/gcc.dg/pr94234-1.c [new file with mode: 0644]