summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2019-09-05 15:07:07 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2019-09-05 15:07:07 +0000
commit29361c704dfaefdd0f5a1c4b2d8eaa56f012bb7d (patch)
treea66cb19d2b1dab16ab530a7525aaedd72e01a5bd /llvm/lib/Target/X86
parent167730196976950144eea7d3cd0ae2bb918e480f (diff)
downloadbcm5719-llvm-29361c704dfaefdd0f5a1c4b2d8eaa56f012bb7d.tar.gz
bcm5719-llvm-29361c704dfaefdd0f5a1c4b2d8eaa56f012bb7d.zip
[X86][SSE] EltsFromConsecutiveLoads - ignore non-zero offset base loads (PR43227)
As discussed on D64551 and PR43227, we don't correctly handle cases where the base load has a non-zero byte offset. Until we can properly handle this, we must bail from EltsFromConsecutiveLoads. llvm-svn: 371078
Diffstat (limited to 'llvm/lib/Target/X86')
-rw-r--r--llvm/lib/Target/X86/X86ISelLowering.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index dc031459a27..844a29c01c1 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -7719,6 +7719,10 @@ static SDValue EltsFromConsecutiveLoads(EVT VT, ArrayRef<SDValue> Elts,
int LoadSizeInBits = (1 + LastLoadedElt - FirstLoadedElt) * BaseSizeInBits;
assert((BaseSizeInBits % 8) == 0 && "Sub-byte element loads detected");
+ // TODO: Support offsetting the base load.
+ if (ByteOffsets[FirstLoadedElt] != 0)
+ return SDValue();
+
// Check to see if the element's load is consecutive to the base load
// or offset from a previous (already checked) load.
auto CheckConsecutiveLoad = [&](LoadSDNode *Base, int EltIdx) {
OpenPOWER on IntegriCloud