[Ada] Deal with second specific superflat case in Optimize_Length_Comparison
authorEric Botcazou <ebotcazou@adacore.com>
Mon, 13 Apr 2020 07:16:18 +0000 (09:16 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 17 Jun 2020 08:14:05 +0000 (04:14 -0400)
commit22b5aff279b2d0e0c205b753f18f88fceb85df9c
tree595ab11e6634e6fad3b8a4bbe94d43ebceeffcac
parent741826eff5855366c65d49123b899ea40fc0c443
[Ada] Deal with second specific superflat case in Optimize_Length_Comparison

2020-06-17  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

* exp_ch4.adb (Optimize_Length_Comparison): New local variable to
record whether this may be a dynamic superflat case.
(Is_Optimizable): Accept 0 as lower bound and set it in this case,
but return false if the operand is not a length too.
(Rewrite_For_Equal_Lengths): New procedure.
Optimize the comparison of two lengths in the superflat case when
the arrays have the same bounds.
gcc/ada/exp_ch4.adb