summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2017-04-21 20:35:52 +0000
committerTim Northover <tnorthover@apple.com>2017-04-21 20:35:52 +0000
commite31cf3f824786e020f4dea9ad216a65538f8a630 (patch)
tree8d429b617b7f6204ee72762eff056ae52975f931 /llvm/lib/Target
parent8ce1d4cbe1c2ddfaf49d49867e59a96812ec5f51 (diff)
downloadbcm5719-llvm-e31cf3f824786e020f4dea9ad216a65538f8a630.tar.gz
bcm5719-llvm-e31cf3f824786e020f4dea9ad216a65538f8a630.zip
ARM: make sure we use all entries in a vector before forming a vpaddl.
Otherwise there's some mismatch, and we'll either form an illegal type or an illegal node. Thanks to Eli Friedman for pointing out the problem with my original solution. llvm-svn: 301036
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/ARM/ARMISelLowering.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Target/ARM/ARMISelLowering.cpp b/llvm/lib/Target/ARM/ARMISelLowering.cpp
index df840d723e3..382f881f774 100644
--- a/llvm/lib/Target/ARM/ARMISelLowering.cpp
+++ b/llvm/lib/Target/ARM/ARMISelLowering.cpp
@@ -9480,11 +9480,11 @@ AddCombineBUILD_VECTORToVPADDL(SDNode *N, SDValue N0, SDValue N1,
return SDValue();
}
- // Don't generate vpaddl+vmovn; we'll match it to vpadd later. Also don't try
- // to handle an i8 -> i32 situation (or similar). vpaddl can only double the
- // size.
- if (2 * Vec.getValueType().getVectorElementType().getSizeInBits() !=
- VT.getVectorElementType().getSizeInBits())
+ // Don't generate vpaddl+vmovn; we'll match it to vpadd later. Also make sure
+ // we're using the entire input vector, otherwise there's a size/legality
+ // mismatch somewhere.
+ if (nextIndex != Vec.getValueType().getVectorNumElements() ||
+ Vec.getValueType().getVectorElementType() == VT.getVectorElementType())
return SDValue();
// Create VPADDL node.
OpenPOWER on IntegriCloud