Runtime of internal test case increased dramatically after SLP change
An internal test case (C++ and LLVM IR attached), takes over 78 min to run after the following commit. Previously, it completed in about 2 min. On current master, the situation has improved substantially, but is still dramatically slower at just over 15 min. I noticed that there's been performance-related discussions on the original review, so I hope the attached test case will be useful for further investigation. It isn't small, but its structure is regular: test.zip
commit 7ea03f0b4e4ec5d91d48ba2976f5adc299089ffd
Author: Alexey Bataev <[email protected]>
Date: Thu Nov 18 08:08:01 2021 -0800
[SLP]Improve reductions analysis and emission, part 1.
After 7ea03f0b:
$ time opt -slp-vectorizer -o out.ll test.ll
real 78m7.682s
user 78m7.299s
sys 0m0.236s
$
Before 7ea03f0b:
$ time opt -S -slp-vectorizer test.ll -o slp-opt.ll
real 1m42.031s
user 1m41.980s
sys 0m0.048s
$
Current master:
$ time opt -S -slp-vectorizer test.ll -o slp-opt.ll
real 15m34.115s
user 15m33.978s
sys 0m0.096s
$
@alexey-bataev
Have a fix, my time for the provided test after the fix is 0.312 s. Hope to commit it today or next week as NFC patch.
Must be fixed in da4e0f7ac58711ddeaf86943ae82c1928e26801f
Looks good. Thanks so much!