[Fix] Accidently changed the type of a libgomp argument in r219003.

Only subsequent patches introduced tests for the signature in the
  generated IR, thus the tests were wrong too and are adjusted now.

llvm-svn: 219017
This commit is contained in:
Johannes Doerfert 2014-10-03 20:40:24 +00:00
parent 50600f39ab
commit a441783544
3 changed files with 7 additions and 7 deletions

View File

@ -189,14 +189,14 @@ void ParallelLoopGenerator::createCallSpawnThreads(Value *SubFn,
Type *Params[] = {PointerType::getUnqual(FunctionType::get(
Builder.getVoidTy(), Builder.getInt8PtrTy(), false)),
Builder.getInt8PtrTy(), LongType, LongType, LongType,
LongType};
Builder.getInt8PtrTy(), Builder.getInt32Ty(), LongType,
LongType, LongType};
FunctionType *Ty = FunctionType::get(Builder.getVoidTy(), Params, false);
F = Function::Create(Ty, Linkage, Name, M);
}
Value *NumberOfThreads = ConstantInt::get(LongType, PollyNumThreads);
Value *NumberOfThreads = Builder.getInt32(PollyNumThreads);
Value *Args[] = {SubFn, SubFnParam, NumberOfThreads, LB, UB, Stride};
Builder.CreateCall(F, Args);

View File

@ -13,7 +13,7 @@
; CHECK-NEXT: %[[GEP:[._0-9a-zA-Z]*]] = getelementptr inbounds { i32* }* %polly.par.userContext, i32 0, i32 0
; CHECK-NEXT: store i32* %A, i32** %[[GEP]]
; CHECK-NEXT: %polly.par.userContext{{[0-9]*}} = bitcast { i32* }* %polly.par.userContext to i8*
; CHECK-NEXT: call void @GOMP_parallel_loop_runtime_start(void (i8*)* @jd.polly.subfn, i8* %polly.par.userContext{{[0-9]*}}, i64 0, i64 0, i64 1024, i64 1)
; CHECK-NEXT: call void @GOMP_parallel_loop_runtime_start(void (i8*)* @jd.polly.subfn, i8* %polly.par.userContext{{[0-9]*}}, i32 0, i64 0, i64 1024, i64 1)
; CHECK-NEXT: call void @jd.polly.subfn(i8* %polly.par.userContext{{[0-9]*}})
; CHECK-NEXT: call void @GOMP_parallel_end()
; CHECK-NEXT: %[[BC2:[._0-9a-zA-Z]*]] = bitcast { i32* }* %polly.par.userContext to i8*

View File

@ -2,9 +2,9 @@
; RUN: opt %loadPolly -polly-codegen -enable-polly-openmp -polly-num-threads=1 -S < %s | FileCheck %s --check-prefix=ONE
; RUN: opt %loadPolly -polly-codegen -enable-polly-openmp -polly-num-threads=4 -S < %s | FileCheck %s --check-prefix=FOUR
;
; AUTO: call void @GOMP_parallel_loop_runtime_start(void (i8*)* @jd.polly.subfn, i8* %polly.par.userContext{{[0-9]*}}, i64 0, i64 0, i64 1024, i64 1)
; ONE: call void @GOMP_parallel_loop_runtime_start(void (i8*)* @jd.polly.subfn, i8* %polly.par.userContext{{[0-9]*}}, i64 1, i64 0, i64 1024, i64 1)
; FOUR: call void @GOMP_parallel_loop_runtime_start(void (i8*)* @jd.polly.subfn, i8* %polly.par.userContext{{[0-9]*}}, i64 4, i64 0, i64 1024, i64 1)
; AUTO: call void @GOMP_parallel_loop_runtime_start(void (i8*)* @jd.polly.subfn, i8* %polly.par.userContext{{[0-9]*}}, i32 0, i64 0, i64 1024, i64 1)
; ONE: call void @GOMP_parallel_loop_runtime_start(void (i8*)* @jd.polly.subfn, i8* %polly.par.userContext{{[0-9]*}}, i32 1, i64 0, i64 1024, i64 1)
; FOUR: call void @GOMP_parallel_loop_runtime_start(void (i8*)* @jd.polly.subfn, i8* %polly.par.userContext{{[0-9]*}}, i32 4, i64 0, i64 1024, i64 1)
;
; void jd(int *A) {
; for (int i = 0; i < 1024; i++)