Re: [PATCH] tree-chrec: Fix up ICE on pointer multiplication [PR107835]

2022-11-30 Thread Richard Biener via Gcc-patches
On Wed, 30 Nov 2022, Jakub Jelinek wrote: > Hi! > > r13-254-gdd3c7873a61019e9 added an optimization for {a, +, a} (x-1), > but as can be seen on the following testcase, the way it is written > where chrec_fold_multiply is called with type doesn't work for pointers: >  res = build_int_

[PATCH] tree-chrec: Fix up ICE on pointer multiplication [PR107835]

2022-11-30 Thread Jakub Jelinek via Gcc-patches
Hi! r13-254-gdd3c7873a61019e9 added an optimization for {a, +, a} (x-1), but as can be seen on the following testcase, the way it is written where chrec_fold_multiply is called with type doesn't work for pointers:  res = build_int_cst (TREE_TYPE (x), 1);  res = chrec_fold_p