diff options
author | Fraser Cormack <fraser@codeplay.com> | 2021-10-15 14:24:53 +0100 |
---|---|---|
committer | Fraser Cormack <fraser@codeplay.com> | 2021-10-18 10:00:00 +0100 |
commit | 3d850d03ae4d167f929c4469f858446d4a866c01 (patch) | |
tree | 4c0a135038b0784762a67eb34094b5db2e780a5f /clang/lib/Frontend/CompilerInstance.cpp | |
parent | 942536ac084c2e12271140831be0c97da39cde2e (diff) | |
download | llvm-3d850d03ae4d167f929c4469f858446d4a866c01.zip llvm-3d850d03ae4d167f929c4469f858446d4a866c01.tar.gz llvm-3d850d03ae4d167f929c4469f858446d4a866c01.tar.bz2 |
[SelectionDAG] Fix illegal widening of scalable-vector loads
The process of widening simple vector loads attempts to use a load of a
wider vector type if the original load is sufficiently aligned to avoid
memory faults.
However this optimization is only legal when performed on fixed-length
vector types. For scalable vector types this is invalid (unless vscale
happens to be 1).
This patch does increase the likelihood of compiler crashes (from
`FindMemType` failing to find a suitable type) but this now better
matches how widening non-simple loads, insufficiently-aligned loads, and
scalable-vector stores are handled.
Patches will be introduced later by which loads and stores can be
widened on targets with support for masked or predicated operations.
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D111885
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
0 files changed, 0 insertions, 0 deletions