From 7527e3f59c931e581a501ea680f65f94c892c6ec Mon Sep 17 00:00:00 2001 From: Tobias Grosser Date: Sun, 5 Apr 2015 06:53:21 +0000 Subject: [PATCH] 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 llvm-svn: 234113 --- polly/lib/CodeGen/IslCodeGeneration.cpp | 2 +- polly/test/Isl/CodeGen/simple_vec_assign_scalar.ll | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/polly/lib/CodeGen/IslCodeGeneration.cpp b/polly/lib/CodeGen/IslCodeGeneration.cpp index a1defab536f6..901f865867da 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 6e279b58fa0d..eccb067f0ad3 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, ; 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