summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms
diff options
context:
space:
mode:
authorFlorian Hahn <flo@fhahn.com>2018-12-20 18:49:09 +0000
committerFlorian Hahn <flo@fhahn.com>2018-12-20 18:49:09 +0000
commitef307b8c262735dafd69b6acf5a11456c83d1473 (patch)
tree4b03d078da671094cf4cf45dcd45af26287162a5 /llvm/test/Transforms
parent1f6189ed06398497f257460b2e8bfc7a5fc81bdc (diff)
downloadbcm5719-llvm-ef307b8c262735dafd69b6acf5a11456c83d1473.tar.gz
bcm5719-llvm-ef307b8c262735dafd69b6acf5a11456c83d1473.zip
[LAA] Avoid generating RT checks for known deps preventing vectorization.
If we found unsafe dependences other than 'unknown', we already know at compile time that they are unsafe and the runtime checks should always fail. So we can avoid generating them in those cases. This should have no negative impact on performance as the runtime checks that would be created previously should always fail. As a sanity check, I measured the test-suite, spec2k and spec2k6 and there were no regressions. Reviewers: Ayal, anemet, hsaito Reviewed By: Ayal Differential Revision: https://reviews.llvm.org/D55798 llvm-svn: 349794
Diffstat (limited to 'llvm/test/Transforms')
-rw-r--r--llvm/test/Transforms/LoopVectorize/runtime-check.ll6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/test/Transforms/LoopVectorize/runtime-check.ll b/llvm/test/Transforms/LoopVectorize/runtime-check.ll
index 19bfa50f769..332e3efb65d 100644
--- a/llvm/test/Transforms/LoopVectorize/runtime-check.ll
+++ b/llvm/test/Transforms/LoopVectorize/runtime-check.ll
@@ -117,7 +117,9 @@ loopexit:
ret void
}
-; Check we do generate unnecessary runtime checks. They will always fail.
+; Check we do not generate runtime checks if we found a known dependence preventing
+; vectorization. In this case, it is a read of c[i-1] followed by a write of c[i].
+; The runtime checks would always fail.
; void test_runtime_check2(float *a, float b, unsigned offset, unsigned offset2, unsigned n, float *c) {
; for (unsigned i = 1; i < n; i++) {
@@ -127,7 +129,7 @@ loopexit:
; }
;
; CHECK-LABEL: test_runtime_check2
-; CHECK: <4 x float>
+; CHECK-NOT: <4 x float>
define void @test_runtime_check2(float* %a, float %b, i64 %offset, i64 %offset2, i64 %n, float* %c) {
entry:
br label %for.body
OpenPOWER on IntegriCloud