summaryrefslogtreecommitdiff
path: root/test/CodeGen/ARM/vector-DAGCombine.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/ARM/vector-DAGCombine.ll')
-rw-r--r--test/CodeGen/ARM/vector-DAGCombine.ll10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/CodeGen/ARM/vector-DAGCombine.ll b/test/CodeGen/ARM/vector-DAGCombine.ll
index 81bdc44863..1a97982eb0 100644
--- a/test/CodeGen/ARM/vector-DAGCombine.ll
+++ b/test/CodeGen/ARM/vector-DAGCombine.ll
@@ -123,3 +123,13 @@ define void @orVec(<3 x i8>* %A) nounwind {
ret void
}
+; The following test was hitting an assertion in the DAG combiner when
+; constant folding the multiply because the "sext undef" was translated to
+; a BUILD_VECTOR with i32 0 operands, which did not match the i16 operands
+; of the other BUILD_VECTOR.
+define i16 @foldBuildVectors() {
+ %1 = sext <8 x i8> undef to <8 x i16>
+ %2 = mul <8 x i16> %1, <i16 255, i16 255, i16 255, i16 255, i16 255, i16 255, i16 255, i16 255>
+ %3 = extractelement <8 x i16> %2, i32 0
+ ret i16 %3
+}