[fpc-devel] Finally fixed that MOVZX/SX optimisation!
J. Gareth Moreton
gareth at moreton-family.com
Wed Feb 19 22:19:11 CET 2020
True, the test was not about the optimisation, but proved to be the most
useful because it turned out that all the typecasting and constant
propagation (or lack of) was perfect for seeing how the peephole
optimizer handled mov/movzx and mov/movsx pairs. There was an existing
test named tcnvint3b.pp that specifies -Oonoconstprop and then just
includes tcnvint3.pp. For my new tests, tcnvint3a and tcnvint3c, they
are copies of those two tests but adding -O4 to the list too. (3 has no
command switches, 3a is -O4, 3b is -Oonoconstprop and 3c is both options).
Gareth aka. Kit
On 19/02/2020 21:03, Sven Barth via fpc-devel wrote:
> Am 19.02.2020 um 20:37 schrieb Florian Klämpfl:
>> Am 19.02.20 um 11:23 schrieb Sven Barth via fpc-devel:
>>> J. Gareth Moreton <gareth at moreton-family.com
>>> <mailto:gareth at moreton-family.com>> schrieb am Mi., 19. Feb. 2020,
>>> Ah, I understand, thank you.
>>> I chose those two tests in particular because the design with
>>> typecasts opens it up to a lot of peephole optimisations.
>>> The nightly testsuite is run multiple times with different settings,
>>> so as Joost said it shouldn't be necessary to single out tests for
>>> optimization levels.
>> If a particular bug is known to be only triggered by a certain
>> combination of command line switches, the test should be run always
>> with these switches imo.
> But then in this specific case the test should be duplicated (as J.
> Gareth had done in his patch), maybe even moved to a different
> directory, cause the original test is *not* about the optimization.
> fpc-devel maillist - fpc-devel at lists.freepascal.org
More information about the fpc-devel