Comparison of Vectorization Capabilities of Different Compilers for X86 and ARM CPUs

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Sakib, Nazmus, Prabhu, Tarun, Santhi, Nandakishore, Shalf, John, Badawy, Abdel-Hameed A.
Format: Preprint
Publié: 2025
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866916622433779712
author Sakib, Nazmus
Prabhu, Tarun
Santhi, Nandakishore
Shalf, John
Badawy, Abdel-Hameed A.
author_facet Sakib, Nazmus
Prabhu, Tarun
Santhi, Nandakishore
Shalf, John
Badawy, Abdel-Hameed A.
contents Most modern processors contain vector units that simultaneously perform the same arithmetic operation over multiple sets of operands. The ability of compilers to automatically vectorize code is critical to effectively using these units. Understanding this capability is important for anyone writing compute-intensive, high-performance, and portable code. We tested the ability of several compilers to vectorize code on x86 and ARM. We used the TSVC2 suite, with modifications that made it more representative of real-world code. On x86, GCC reported 54% of the loops in the suite as having been vectorized, ICX reported 50%, and Clang, 46%. On ARM, GCC reported 56% of the loops as having been vectorized, ACFL reported 54%, and Clang, 47%. We found that the vectorized code did not always outperform the unvectorized code. In some cases, given two very similar vectorizable loops, a compiler would vectorize one but not the other. We also report cases where a compiler vectorized a loop on only one of the two platforms. Based on our experiments, we cannot definitively say if any one compiler is significantly better than the others at vectorizing code on any given platform.
format Preprint
id arxiv_https___arxiv_org_abs_2502_11906
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Comparison of Vectorization Capabilities of Different Compilers for X86 and ARM CPUs
Sakib, Nazmus
Prabhu, Tarun
Santhi, Nandakishore
Shalf, John
Badawy, Abdel-Hameed A.
Performance
Distributed, Parallel, and Cluster Computing
Most modern processors contain vector units that simultaneously perform the same arithmetic operation over multiple sets of operands. The ability of compilers to automatically vectorize code is critical to effectively using these units. Understanding this capability is important for anyone writing compute-intensive, high-performance, and portable code. We tested the ability of several compilers to vectorize code on x86 and ARM. We used the TSVC2 suite, with modifications that made it more representative of real-world code. On x86, GCC reported 54% of the loops in the suite as having been vectorized, ICX reported 50%, and Clang, 46%. On ARM, GCC reported 56% of the loops as having been vectorized, ACFL reported 54%, and Clang, 47%. We found that the vectorized code did not always outperform the unvectorized code. In some cases, given two very similar vectorizable loops, a compiler would vectorize one but not the other. We also report cases where a compiler vectorized a loop on only one of the two platforms. Based on our experiments, we cannot definitively say if any one compiler is significantly better than the others at vectorizing code on any given platform.
title Comparison of Vectorization Capabilities of Different Compilers for X86 and ARM CPUs
topic Performance
Distributed, Parallel, and Cluster Computing
url https://arxiv.org/abs/2502.11906