summaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorFraser Cormack <fraser@codeplay.com>2021-05-21 13:00:19 +0100
committerFraser Cormack <fraser@codeplay.com>2021-05-24 10:19:32 +0100
commit7a211ed110a72ad453305aba250da50c965c2f8e (patch)
treee07e6b3f2a742e97efa4366c23d24df3785e41c5 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parent5c4a5daf293c1c924caa3c6faed4487682d70045 (diff)
[RISCV] Prevent store combining from infinitely looping
RVV code generation does not successfully custom-lower BUILD_VECTOR in all cases. When it resorts to default expansion it may, on occasion, be expanded to scalar stores through the stack. Unfortunately these stores may then be picked up by the post-legalization DAGCombiner which merges them again. The merged store uses a BUILD_VECTOR which is then expanded, and so on. This patch addresses the issue by overriding the `mergeStoresAfterLegalization` hook. A lack of granularity in this method (being passed the scalar type) means we opt out in almost all cases when RVV fixed-length vector support is enabled. The only exception to this rule are mask vectors, which are always either custom-lowered or are expanded to a load from a constant pool. Reviewed By: HsiangKai Differential Revision: https://reviews.llvm.org/D102913
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions