summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2017-04-21 17:21:59 +0000
committerTim Northover <tnorthover@apple.com>2017-04-21 17:21:59 +0000
commit1061ccca8c9214e9ea1de9dd85a7897d700c1478 (patch)
tree97657bc5d1b784e3524f2394c57eb28dbc2e443b /llvm/lib/Target
parent676d008198f7f7809ffe03fe6d72f406d7f6a3aa (diff)
downloadbcm5719-llvm-1061ccca8c9214e9ea1de9dd85a7897d700c1478.tar.gz
bcm5719-llvm-1061ccca8c9214e9ea1de9dd85a7897d700c1478.zip
ARM: don't try to create an i8 -> i32 vpaddl.
DAG combine was mistakenly assuming that the step-up it was looking at was always a doubling, but it can sometimes be a larger extension in which case we'd crash. llvm-svn: 301002
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/ARM/ARMISelLowering.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/Target/ARM/ARMISelLowering.cpp b/llvm/lib/Target/ARM/ARMISelLowering.cpp
index 0f8cdad983d..df840d723e3 100644
--- a/llvm/lib/Target/ARM/ARMISelLowering.cpp
+++ b/llvm/lib/Target/ARM/ARMISelLowering.cpp
@@ -9480,8 +9480,11 @@ AddCombineBUILD_VECTORToVPADDL(SDNode *N, SDValue N0, SDValue N1,
return SDValue();
}
- // Don't generate vpaddl+vmovn; we'll match it to vpadd later.
- if (Vec.getValueType().getVectorElementType() == VT.getVectorElementType())
+ // 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())
return SDValue();
// Create VPADDL node.
OpenPOWER on IntegriCloud