diff options
author | Tobias Grosser <tobias@grosser.es> | 2015-04-05 06:53:21 +0000 |
---|---|---|
committer | Tobias Grosser <tobias@grosser.es> | 2015-04-05 06:53:21 +0000 |
commit | 7527e3f59c931e581a501ea680f65f94c892c6ec (patch) | |
tree | 0bccaad72bf4fa0de8a6bb4213b01118af4f3632 | |
parent | fe4bb1c81b8f4142ac74b8a4844f347c2648308f (diff) | |
download | bcm5719-llvm-7527e3f59c931e581a501ea680f65f94c892c6ec.tar.gz bcm5719-llvm-7527e3f59c931e581a501ea680f65f94c892c6ec.zip |
Do not use the POLLY vector code generator if only strip-mining is requested
This fixes http://llvm.org/PR23127
Reported-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
llvm-svn: 234113
-rw-r--r-- | polly/lib/CodeGen/IslCodeGeneration.cpp | 2 | ||||
-rw-r--r-- | polly/test/Isl/CodeGen/simple_vec_assign_scalar.ll | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/polly/lib/CodeGen/IslCodeGeneration.cpp b/polly/lib/CodeGen/IslCodeGeneration.cpp index a1defab536f..901f865867d 100644 --- a/polly/lib/CodeGen/IslCodeGeneration.cpp +++ b/polly/lib/CodeGen/IslCodeGeneration.cpp @@ -693,7 +693,7 @@ void IslNodeBuilder::createForParallel(__isl_take isl_ast_node *For) { } void IslNodeBuilder::createFor(__isl_take isl_ast_node *For) { - bool Vector = PollyVectorizerChoice != VECTORIZER_NONE; + bool Vector = PollyVectorizerChoice == VECTORIZER_POLLY; if (Vector && IslAstInfo::isInnermostParallel(For) && !IslAstInfo::isReductionParallel(For)) { diff --git a/polly/test/Isl/CodeGen/simple_vec_assign_scalar.ll b/polly/test/Isl/CodeGen/simple_vec_assign_scalar.ll index 6e279b58fa0..eccb067f0ad 100644 --- a/polly/test/Isl/CodeGen/simple_vec_assign_scalar.ll +++ b/polly/test/Isl/CodeGen/simple_vec_assign_scalar.ll @@ -1,4 +1,5 @@ ; RUN: opt %loadPolly -polly-detect-unprofitable -basicaa -polly-codegen-isl -polly-vectorizer=polly -dce -S < %s | FileCheck %s +; RUN: opt %loadPolly -polly-detect-unprofitable -basicaa -polly-codegen-isl -polly-vectorizer=stripmine -dce -S < %s | FileCheck %s --check-prefix=STRIPMINE ;#define N 1024 ;float A[N]; @@ -55,6 +56,8 @@ bb: ret i32 %tmp1 } +; STRIPMINE-NOT: <4 x float> + ; CHECK: %tmp_p_vec_full = load <4 x float>, <4 x float>* bitcast ([1024 x float]* @A to <4 x float>*), align 8, !alias.scope !0, !noalias !2 ; CHECK: %tmp4p_vec = fadd <4 x float> %tmp_p_vec_full, <float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00> ; CHECK: store <4 x float> %tmp4p_vec, <4 x float>* bitcast ([1024 x float]* @B to <4 x float>*), align 8, !alias.scope !3, !noalias !4 |