diff options
author | Sander de Smalen <sander.desmalen@arm.com> | 2020-01-22 10:42:57 +0000 |
---|---|---|
committer | Sander de Smalen <sander.desmalen@arm.com> | 2020-01-22 14:32:27 +0000 |
commit | 4cf16efe49766d454eda74927a547a0cf587f540 (patch) | |
tree | 2b837e475b8729ad9c3ae72ddb41ec179a42006f /llvm/lib/CodeGen/CodeGenPrepare.cpp | |
parent | e0f0d0e55cc7d389ad0692fbc9678e7895978355 (diff) | |
download | llvm-4cf16efe49766d454eda74927a547a0cf587f540.zip llvm-4cf16efe49766d454eda74927a547a0cf587f540.tar.gz llvm-4cf16efe49766d454eda74927a547a0cf587f540.tar.bz2 |
[AArch64][SVE] Add patterns for unpredicated load/store to frame-indices.
This patch also fixes up a number of cases in DAGCombine and
SelectionDAGBuilder where the size of a scalable vector is used in a
fixed-width context (thus triggering an assertion failure).
Reviewers: efriedma, c-rhodes, rovka, cameron.mcinally
Reviewed By: efriedma
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71215
Diffstat (limited to 'llvm/lib/CodeGen/CodeGenPrepare.cpp')
-rw-r--r-- | llvm/lib/CodeGen/CodeGenPrepare.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp index 01adfc1..9639336 100644 --- a/llvm/lib/CodeGen/CodeGenPrepare.cpp +++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp @@ -6809,6 +6809,14 @@ static bool splitMergedValStore(StoreInst &SI, const DataLayout &DL, const TargetLowering &TLI) { // Handle simple but common cases only. Type *StoreType = SI.getValueOperand()->getType(); + + // The code below assumes shifting a value by <number of bits>, + // whereas scalable vectors would have to be shifted by + // <2log(vscale) + number of bits> in order to store the + // low/high parts. Bailing out for now. + if (StoreType->isVectorTy() && StoreType->getVectorIsScalable()) + return false; + if (!DL.typeSizeEqualsStoreSize(StoreType) || DL.getTypeSizeInBits(StoreType) == 0) return false; |