diff options
| author | Tim Northover <tnorthover@apple.com> | 2017-01-25 20:58:26 +0000 |
|---|---|---|
| committer | Tim Northover <tnorthover@apple.com> | 2017-01-25 20:58:26 +0000 |
| commit | 470f070b7dd208f677193439cdb08438f1cee46a (patch) | |
| tree | 54847686604a5a717fa5c3569e7b0beb68bb73a2 /llvm/lib/CodeGen | |
| parent | 9e35f1e21c421242c344b42d646846cd6b82f930 (diff) | |
| download | bcm5719-llvm-470f070b7dd208f677193439cdb08438f1cee46a.tar.gz bcm5719-llvm-470f070b7dd208f677193439cdb08438f1cee46a.zip | |
SDag: fix how initial loads are formed when splitting vector ops.
Later code expects the vector loads produced to be directly
concatenable, which means we shouldn't pad anything except the last load
produced with UNDEF.
llvm-svn: 293088
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp index df7846cb574..74740d1641a 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp @@ -3442,7 +3442,10 @@ SDValue DAGTypeLegalizer::GenWidenVectorLoads(SmallVectorImpl<SDValue> &LdChain, LD->getPointerInfo().getWithOffset(Offset), MinAlign(Align, Increment), MMOFlags, AAInfo); LdChain.push_back(L.getValue(1)); - if (L->getValueType(0).isVector()) { + if (L->getValueType(0).isVector() && NewVTWidth >= LdWidth) { + // Later code assumes the vector loads produced will be mergeable, so we + // must pad the final entry up to the previous width. Scalars are + // combined separately. SmallVector<SDValue, 16> Loads; Loads.push_back(L); unsigned size = L->getValueSizeInBits(0); |

