summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-reassoc.c
diff options
context:
space:
mode:
authorSegher Boessenkool <segher@kernel.crashing.org>2019-04-15 13:33:29 +0200
committerSegher Boessenkool <segher@gcc.gnu.org>2019-04-15 13:33:29 +0200
commitc7797fd3e8889f7017980672dad06a3df8f4cddf (patch)
treecb56a08897aa6980a6403a0741b36afe747f2613 /gcc/tree-ssa-reassoc.c
parent869032b176d57ca8c8864a7818394106ca665d06 (diff)
combine: Count auto_inc properly (PR89794)
The code that checks if an auto-increment from i0 or i1 is not lost is a bit shaky. The code to check the same for i2 is non-existent, and cannot be implemented in a similar way at all. So, this patch counts all auto-increments, and makes sure we end up with the same number as we started with. This works because we still have a check that we will not duplicate any. We should do this some better way, but not while we are in stage 4. PR rtl-optimization/89794 * combine.c (count_auto_inc): New function. (try_combine): Count how many auto_inc expressions there were in the original instructions. Ensure we have the same number in the new instructions. Remove the code that tried to ensure auto_inc side effects on i1 and i0 are not lost. gcc/testsuite/ PR rtl-optimization/89794 * gcc.dg/torture/pr89794.c: New testcase. From-SVN: r270368
Diffstat (limited to 'gcc/tree-ssa-reassoc.c')
0 files changed, 0 insertions, 0 deletions