[all-commits] [llvm/llvm-project] 068357: [VectorCombine] Enable transform 'scalarizeLoadExt...
Ben Shi via All-commits
all-commits at lists.llvm.org
Sun Sep 17 19:49:31 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 068357d9b09cd635b1c2f126d119ce9afecb28f7
https://github.com/llvm/llvm-project/commit/068357d9b09cd635b1c2f126d119ce9afecb28f7
Author: Ben Shi <2283975856 at qq.com>
Date: 2023-09-18 (Mon, 18 Sep 2023)
Changed paths:
M llvm/lib/Transforms/Vectorize/VectorCombine.cpp
M llvm/test/Transforms/VectorCombine/AArch64/load-extractelement-scalarization.ll
Log Message:
-----------
[VectorCombine] Enable transform 'scalarizeLoadExtract' for scalable vector types (#65443)
The transform 'scalarizeLoadExtract' can be applied to scalable
vector types if the index is less than the minimum number of elements.
The check whether the index is less than the minimum number of elements
locates at line 1175~1180. 'scalarizeLoadExtract' will call
'canScalarizeAccess' and check the returned result if this transform is safe.
At the beginning of the function 'canScalarizeAccess', the index will be
checked
1. If it is less than the number of elements of a fixed vector type.
2. If it is less than the minimum number of elements of a scalable vector type.
Otherwise 'canScalarizeAccess' will return unsafe and this transform
will be prevented.
More information about the All-commits
mailing list