Re: [PATCH][gcc][middle-end] PR104498: Fix comparing symbol reference

2022-02-17 Thread Richard Biener via Gcc-patches
On Wed, 16 Feb 2022, Andre Vieira (lists) wrote: > Hi, > > As reported on PR104498, the issue here is that when compare_base_symbol_refs > swaps x and y but doesn't take that into account when computing the distance. > This patch makes sure that if x and y are swapped, we correct the distance > c

[PATCH][gcc][middle-end] PR104498: Fix comparing symbol reference

2022-02-16 Thread Andre Vieira (lists) via Gcc-patches
Hi, As reported on PR104498, the issue here is that when compare_base_symbol_refs swaps x and y but doesn't take that into account when computing the distance. This patch makes sure that if x and y are swapped, we correct the distance computation by multiplying it by -1 to end up with the corr