summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2013-01-19 13:57:58 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2013-01-19 13:57:58 +0000
commit1af132dcf3c9fd87ac8ad0c103e74ef3f8a0bae6 (patch)
treefa145c9a97e7d47d32e2188048f1836f1a19895a /test
parentba9586544164e69754039a25cb0ef7907d27382d (diff)
downloadllvm-1af132dcf3c9fd87ac8ad0c103e74ef3f8a0bae6.tar.gz
llvm-1af132dcf3c9fd87ac8ad0c103e74ef3f8a0bae6.tar.bz2
llvm-1af132dcf3c9fd87ac8ad0c103e74ef3f8a0bae6.tar.xz
LoopVectorizer: Emit memory checks into their own basic block.
This separates the check for "too few elements to run the vector loop" from the "memory overlap" check, giving a lot nicer code and allowing to skip the memory checks when we're not going to execute the vector code anyways. We still leave the decision of whether to emit the memory checks as branches or setccs, but it seems to be doing a good job. If ugly code pops up we may want to emit them as separate blocks too. Small speedup on MultiSource/Benchmarks/MallocBench/espresso. Most of this is legwork to allow multiple bypass blocks while updating PHIs, dominators and loop info. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172902 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Transforms/LoopVectorize/runtime-check.ll4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/Transforms/LoopVectorize/runtime-check.ll b/test/Transforms/LoopVectorize/runtime-check.ll
index 574d74d113..86098a6e7d 100644
--- a/test/Transforms/LoopVectorize/runtime-check.ll
+++ b/test/Transforms/LoopVectorize/runtime-check.ll
@@ -9,6 +9,10 @@ target triple = "x86_64-apple-macosx10.9.0"
; a[i] = b[i] * 3;
; }
+;CHECK: for.body.preheader:
+;CHECK: br i1 %cmp.zero, label %middle.block, label %vector.memcheck
+;CHECK: vector.memcheck:
+;CHECK: br i1 %found.conflict, label %middle.block, label %vector.ph
;CHECK: load <4 x float>
define i32 @foo(float* nocapture %a, float* nocapture %b, i32 %n) nounwind uwtable ssp {
entry: