summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMISelLowering.cpp
diff options
context:
space:
mode:
authorAhmed Bougacha <ahmed.bougacha@gmail.com>2015-09-01 21:56:00 +0000
committerAhmed Bougacha <ahmed.bougacha@gmail.com>2015-09-01 21:56:00 +0000
commit699a9dd7c3d217f16c7dd0e6ea53738f7754ba6a (patch)
tree7cf4e6834e30bcfe4ebbae5b2b9cf4c1327f637b /llvm/lib/Target/ARM/ARMISelLowering.cpp
parentee1364f7f69d15309c9ffe44551ea9e0e77046a5 (diff)
downloadbcm5719-llvm-699a9dd7c3d217f16c7dd0e6ea53738f7754ba6a.tar.gz
bcm5719-llvm-699a9dd7c3d217f16c7dd0e6ea53738f7754ba6a.zip
[ARM] Don't abort on variable-idx extractelt in ReconstructShuffle.
The code introduced in r244314 assumed that EXTRACT_VECTOR_ELT only takes constant indices, but it does accept variables. Bail out for those: we can't use them, as the shuffles we want to reconstruct do require constant masks. llvm-svn: 246594
Diffstat (limited to 'llvm/lib/Target/ARM/ARMISelLowering.cpp')
-rw-r--r--llvm/lib/Target/ARM/ARMISelLowering.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMISelLowering.cpp b/llvm/lib/Target/ARM/ARMISelLowering.cpp
index 17c48287f05..f2915a4ab15 100644
--- a/llvm/lib/Target/ARM/ARMISelLowering.cpp
+++ b/llvm/lib/Target/ARM/ARMISelLowering.cpp
@@ -5554,6 +5554,10 @@ SDValue ARMTargetLowering::ReconstructShuffle(SDValue Op,
// A shuffle can only come from building a vector from various
// elements of other vectors.
return SDValue();
+ } else if (!isa<ConstantSDNode>(V.getOperand(1))) {
+ // Furthermore, shuffles require a constant mask, whereas extractelts
+ // accept variable indices.
+ return SDValue();
}
// Add this element source to the list if it's not already there.
OpenPOWER on IntegriCloud