aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/ModuleBuilder.cpp
diff options
context:
space:
mode:
authorFraser Cormack <fraser@codeplay.com>2021-10-06 18:14:06 +0100
committerFraser Cormack <fraser@codeplay.com>2021-11-10 09:55:03 +0000
commit332318ffb613907a268aa909552e3eb16bc1af6b (patch)
tree1efe8fef5920677087c6666281b13dba74d538c6 /clang/lib/CodeGen/ModuleBuilder.cpp
parentf0d997c4723214f5bc098b0acd2e61f3215d4a49 (diff)
downloadllvm-332318ffb613907a268aa909552e3eb16bc1af6b.zip
llvm-332318ffb613907a268aa909552e3eb16bc1af6b.tar.gz
llvm-332318ffb613907a268aa909552e3eb16bc1af6b.tar.bz2
[SelectionDAG] Widen scalable-vector loads/stores via VP_LOAD/VP_STORE
This patch fixes a compiler crash when widening scalable-vector loads and stores which end up breaking down to element-wise store operations. It does so by providing a way for targets with support for vector-predicated loads and stores to use those instead. By widening the operation but maintaining the original effective operation length via the EVL, only the intended vector elements are loaded or stored. This method should in theory be possible and even preferred for fixed-length vector types, but all fixed-length types can be broken down into their elements, and regardless I have observed regressions in the generated code when doing so. I believe this is simply due to VP_LOAD/VP_STORE not being up to par with LOAD/STORE in terms of optimization. It does improve performance on smaller self-contained examples, however, so the potential is there. While the only target that benefits from this is RISCV, the legalization is generic and so was placed centrally. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D111248
Diffstat (limited to 'clang/lib/CodeGen/ModuleBuilder.cpp')
0 files changed, 0 insertions, 0 deletions