summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2018-10-30 18:48:42 +0000
committerCraig Topper <craig.topper@intel.com>2018-10-30 18:48:42 +0000
commit6958b5ffa9ed00d499e81f815a02eaff02cc9614 (patch)
tree043b5e13e0a7517ecbb89558a112e5dc611c5758 /llvm/lib
parent4b0c66deb368bd2f953035dff847a49ea404a4b9 (diff)
downloadbcm5719-llvm-6958b5ffa9ed00d499e81f815a02eaff02cc9614.tar.gz
bcm5719-llvm-6958b5ffa9ed00d499e81f815a02eaff02cc9614.zip
[X86] In lowerVectorShuffleAsBroadcast, make peeking through CONCAT_VECTORS work correctly if we already walked through a bitcast that changed the element size.
The CONCAT_VECTORS case was using the original mask element count to determine how to adjust the broadcast index. But if we looked through a bitcast the original mask size doesn't tell us anything about the concat_vectors. This patch switchs to using the concat_vectors input element count directly instead. Differential Revision: https://reviews.llvm.org/D53823 llvm-svn: 345626
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/X86/X86ISelLowering.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index da5340a050b..9acae2cab22 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -11238,7 +11238,8 @@ static SDValue lowerVectorShuffleAsBroadcast(const SDLoc &DL, MVT VT,
continue;
}
case ISD::CONCAT_VECTORS: {
- int OperandSize = Mask.size() / V.getNumOperands();
+ int OperandSize =
+ V.getOperand(0).getSimpleValueType().getVectorNumElements();
V = V.getOperand(BroadcastIdx / OperandSize);
BroadcastIdx %= OperandSize;
continue;
OpenPOWER on IntegriCloud