summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorAhmed Bougacha <ahmed.bougacha@gmail.com>2016-01-14 02:12:30 +0000
committerAhmed Bougacha <ahmed.bougacha@gmail.com>2016-01-14 02:12:30 +0000
commitdfc77357a0eb17412e284b4d0bad37bbf2c39c2e (patch)
tree2c460f16b5f73175d3c862305b7b31d0d209bcb5 /llvm/lib
parente7268c1a9aeca852b52f43c119ba74cc8832258d (diff)
downloadbcm5719-llvm-dfc77357a0eb17412e284b4d0bad37bbf2c39c2e.tar.gz
bcm5719-llvm-dfc77357a0eb17412e284b4d0bad37bbf2c39c2e.zip
[AArch64] Don't assume extractelt constant index when matching shuffle.
llvm-svn: 257735
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/AArch64/AArch64ISelLowering.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
index 4ecfbe9e228..77637364337 100644
--- a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+++ b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
@@ -4864,9 +4864,10 @@ SDValue AArch64TargetLowering::ReconstructShuffle(SDValue Op,
SDValue V = Op.getOperand(i);
if (V.getOpcode() == ISD::UNDEF)
continue;
- else if (V.getOpcode() != ISD::EXTRACT_VECTOR_ELT) {
+ else if (V.getOpcode() != ISD::EXTRACT_VECTOR_ELT ||
+ !isa<ConstantSDNode>(V.getOperand(1))) {
// A shuffle can only come from building a vector from various
- // elements of other vectors.
+ // elements of other vectors, provided their indices are constant.
return SDValue();
}
OpenPOWER on IntegriCloud