llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

65% regression on Banana Pi F3 on Shootout-C++-matrix

Open lukel97 opened this issue 7 months ago • 5 comments

Between f089c0fe9117ccbf9abc439722354873b417e104 and ac90ab67b800876c367290abfd3c7df9ae99a94b there's been a 65% performance regression on SingleSource/Benchmarks/Shootout-C++/Shootout-C++-matrix, with -march=rva22u64_v -O3 -flto. The P550 machine didn't regress so I presume this is related to vectorization.

https://cc-perf.igalia.com/db_default/v4/nts/profile/303/482/478

https://cc-perf.igalia.com/db_default/v4/nts/graph?highlight_run=482&plot.303=4.303.3

I think there were some changes to SLP vectorization recently, not sure if that's related cc) @alexey-bataev @bababuck

lukel97 avatar May 03 '26 02:05 lukel97

@llvm/issue-subscribers-backend-risc-v

Author: Luke Lau (lukel97)

Between f089c0fe9117ccbf9abc439722354873b417e104 and ac90ab67b800876c367290abfd3c7df9ae99a94b there's been a 65% performance regression on SingleSource/Benchmarks/Shootout-C++/Shootout-C++-matrix, with `-march=rva22u64_v -O3 -flto`. The P550 machine didn't regress so I presume this is related to vectorization.

https://cc-perf.igalia.com/db_default/v4/nts/profile/303/482/478

https://cc-perf.igalia.com/db_default/v4/nts/graph?highlight_run=482&plot.303=4.303.3

I think there were some changes to SLP vectorization recently, not sure if that's related cc) @alexey-bataev @bababuck

Need a reproducer to understand

alexey-bataev avatar May 03 '26 03:05 alexey-bataev

2 SLP-related commits: c1b347eacbf59e2d6bafc0f4894f8ef2df471c8d ([SLP] Refine loop-aware gather cost and admit sibling-loop subtrees) and 783bf90ec9520207ed99f6da11c2215d94df7c75 ([SLP]Vectorize operand chains of non-vectorizable instructions). If it is caused by SPL, then probably by the second one, but it means there are some issues with the cost model.

alexey-bataev avatar May 03 '26 03:05 alexey-bataev

@lukel97 have you looked further into this? If not I can try to debug, I think I can get access to a BananaPi.

bababuck avatar May 11 '26 18:05 bababuck

@lukel97 have you looked further into this? If not I can try to debug, I think I can get access to a BananaPi.

I haven't had any further time unfortunately, that would be great if you could take a look into this

lukel97 avatar May 12 '26 11:05 lukel97