summaryrefslogtreecommitdiff
path: root/test/Transforms
diff options
context:
space:
mode:
authorYi Jiang <yjiang@apple.com>2013-09-24 19:33:53 +0000
committerYi Jiang <yjiang@apple.com>2013-09-24 19:33:53 +0000
commite64f5e00264ae7b3f3a2a5904cf2ca2deab6ed6e (patch)
tree529fc74294ae4129e415a74fcda56509cdb0bb56 /test/Transforms
parent7e720f485f32b255671793ad6d7312681752462a (diff)
downloadllvm-e64f5e00264ae7b3f3a2a5904cf2ca2deab6ed6e.tar.gz
llvm-e64f5e00264ae7b3f3a2a5904cf2ca2deab6ed6e.tar.bz2
llvm-e64f5e00264ae7b3f3a2a5904cf2ca2deab6ed6e.tar.xz
Test case for r191314.
Some supplemental information for r191314: We would like to make sure SLP Vectorizer will not try to vectorize tiny trees even with a negative threshold so we set the cost to INT_MAX. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191327 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms')
-rw-r--r--test/Transforms/SLPVectorizer/X86/tiny-tree.ll27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/Transforms/SLPVectorizer/X86/tiny-tree.ll b/test/Transforms/SLPVectorizer/X86/tiny-tree.ll
new file mode 100644
index 0000000000..d816232baf
--- /dev/null
+++ b/test/Transforms/SLPVectorizer/X86/tiny-tree.ll
@@ -0,0 +1,27 @@
+target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
+target triple = "x86_64-apple-macosx10.8.0"
+; RUN: opt < %s -basicaa -slp-vectorizer -slp-threshold=-5 -S -mtriple=x86_64-apple-macosx10.8.0 -mcpu=corei7 | FileCheck %s
+
+%t1 = type {%t2, double, double, i8 }
+%t2 = type { double, double, double }
+%t3 = type { double, double, i8 }
+
+; We check that SLP vectorizer will not try to vectorize tiny trees
+; even with a negative threshold.
+; CHECK: tiny_tree_test
+; CHECK-NOT: <2 x double>
+; CHECK: ret
+
+define void @tiny_tree_test(%t3* %this, %t1* %m) align 2 {
+entry:
+ %m41.i = getelementptr inbounds %t1* %m, i64 0, i32 0, i32 1
+ %0 = load double* %m41.i, align 8
+ %_tx = getelementptr inbounds %t3* %this, i64 0, i32 0
+ store double %0, double* %_tx, align 8
+ %m42.i = getelementptr inbounds %t1* %m, i64 0, i32 0, i32 2
+ %1 = load double* %m42.i, align 8
+ %_ty = getelementptr inbounds %t3* %this, i64 0, i32 1
+ store double %1, double* %_ty, align 8
+ ret void
+}
+