aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/SLPVectorizer/X86/crash_flop7.ll
diff options
context:
space:
mode:
authorNadav Rotem <nrotem@apple.com>2013-07-07 06:57:07 +0000
committerNadav Rotem <nrotem@apple.com>2013-07-07 06:57:07 +0000
commit369cc938d261de3295eb70d0738f54ef1a82806c (patch)
tree10497d00e5f4f7a2cd0a9d4b741da0d448787f10 /test/Transforms/SLPVectorizer/X86/crash_flop7.ll
parent95a1b3484d7daf7830161f1613fc812303641abe (diff)
downloadexternal_llvm-369cc938d261de3295eb70d0738f54ef1a82806c.zip
external_llvm-369cc938d261de3295eb70d0738f54ef1a82806c.tar.gz
external_llvm-369cc938d261de3295eb70d0738f54ef1a82806c.tar.bz2
SLPVectorizer: Implement DCE as part of vectorization.
This is a complete re-write if the bottom-up vectorization class. Before this commit we scanned the instruction tree 3 times. First in search of merge points for the trees. Second, for estimating the cost. And finally for vectorization. There was a lot of code duplication and adding the DCE exposed bugs. The new design is simpler and DCE was a part of the design. In this implementation we build the tree once. After that we estimate the cost by scanning the different entries in the constructed tree (in any order). The vectorization phase also works on the built tree. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185774 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/SLPVectorizer/X86/crash_flop7.ll')
-rw-r--r--test/Transforms/SLPVectorizer/X86/crash_flop7.ll46
1 files changed, 46 insertions, 0 deletions
diff --git a/test/Transforms/SLPVectorizer/X86/crash_flop7.ll b/test/Transforms/SLPVectorizer/X86/crash_flop7.ll
new file mode 100644
index 0000000..e11be48
--- /dev/null
+++ b/test/Transforms/SLPVectorizer/X86/crash_flop7.ll
@@ -0,0 +1,46 @@
+; RUN: opt < %s -basicaa -slp-vectorizer -dce -S -mtriple=x86_64-apple-macosx10.8.0 -mcpu=corei7
+
+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"
+
+; Function Attrs: nounwind ssp uwtable
+define void @main() #0 {
+entry:
+ br i1 undef, label %while.body, label %while.end
+
+while.body: ; preds = %entry
+ unreachable
+
+while.end: ; preds = %entry
+ br i1 undef, label %for.end80, label %for.body75.lr.ph
+
+for.body75.lr.ph: ; preds = %while.end
+ br label %for.body75
+
+for.body75: ; preds = %for.body75, %for.body75.lr.ph
+ br label %for.body75
+
+for.end80: ; preds = %while.end
+ br i1 undef, label %for.end300, label %for.body267.lr.ph
+
+for.body267.lr.ph: ; preds = %for.end80
+ br label %for.body267
+
+for.body267: ; preds = %for.body267, %for.body267.lr.ph
+ %s.71010 = phi double [ 0.000000e+00, %for.body267.lr.ph ], [ %add297, %for.body267 ]
+ %mul269 = fmul double undef, undef
+ %mul270 = fmul double %mul269, %mul269
+ %add282 = fadd double undef, undef
+ %mul283 = fmul double %mul269, %add282
+ %add293 = fadd double undef, undef
+ %mul294 = fmul double %mul270, %add293
+ %add295 = fadd double undef, %mul294
+ %div296 = fdiv double %mul283, %add295
+ %add297 = fadd double %s.71010, %div296
+ br i1 undef, label %for.body267, label %for.end300
+
+for.end300: ; preds = %for.body267, %for.end80
+ unreachable
+}
+
+attributes #0 = { nounwind ssp uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-frame-pointer-elim-non-leaf"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "unsafe-fp-math"="false" "use-soft-float"="false" }