[NFC] In GPGPU testcases, replace numeric registers in CHECK directives.

Using numeric registers is flaky, since as soon as one additional
instruction is generated by us, all the tests need to be adapted.

llvm-svn: 319544
This commit is contained in:
Philip Pfaffe 2017-12-01 14:16:39 +00:00
parent 328199ec26
commit f6f8b25e58
5 changed files with 22 additions and 21 deletions

View File

@ -35,22 +35,22 @@
; CHECK-NOT: polly_freeDeviceMemory
; CHECK-NOT: polly_allocateMemoryForDevice
; CHECK: %13 = call i8* @polly_initContextCUDA()
; CHECK-NEXT: %14 = bitcast i32* %A to i8*
; CHECK-NEXT: %15 = bitcast i32* %R to i8*
; CHECK-NEXT: %16 = getelementptr [2 x i8*], [2 x i8*]* %polly_launch_0_params, i64 0, i64 0
; CHECK-NEXT: store i8* %14, i8** %polly_launch_0_param_0
; CHECK-NEXT: %17 = bitcast i8** %polly_launch_0_param_0 to i8*
; CHECK-NEXT: store i8* %17, i8** %16
; CHECK-NEXT: %18 = getelementptr [2 x i8*], [2 x i8*]* %polly_launch_0_params, i64 0, i64 1
; CHECK-NEXT: store i8* %15, i8** %polly_launch_0_param_1
; CHECK-NEXT: %19 = bitcast i8** %polly_launch_0_param_1 to i8*
; CHECK-NEXT: store i8* %19, i8** %18
; CHECK-NEXT: %20 = call i8* @polly_getKernel(i8* getelementptr inbounds ([852 x i8], [852 x i8]* @FUNC_copy_SCOP_0_KERNEL_0, i32 0, i32 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @FUNC_copy_SCOP_0_KERNEL_0_name, i32 0, i32 0))
; CHECK-NEXT: call void @polly_launchKernel(i8* %20, i32 2, i32 1, i32 32, i32 1, i32 1, i8* %polly_launch_0_params_i8ptr)
; CHECK-NEXT: call void @polly_freeKernel(i8* %20)
; CHECK: %[[REGCTX:[0-9]+]] = call i8* @polly_initContextCUDA()
; CHECK-NEXT: %[[REGCA:[0-9]+]] = bitcast i32* %A to i8*
; CHECK-NEXT: %[[REGCR:[0-9]+]] = bitcast i32* %R to i8*
; CHECK-NEXT: %[[REGGEP0:[0-9]+]] = getelementptr [2 x i8*], [2 x i8*]* %polly_launch_0_params, i64 0, i64 0
; CHECK-NEXT: store i8* %[[REGCA]], i8** %polly_launch_0_param_0
; CHECK-NEXT: %[[REGCP0:[0-9]+]] = bitcast i8** %polly_launch_0_param_0 to i8*
; CHECK-NEXT: store i8* %[[REGCP0]], i8** %[[REGGEP0]]
; CHECK-NEXT: %[[REGGEP1:[0-9]+]] = getelementptr [2 x i8*], [2 x i8*]* %polly_launch_0_params, i64 0, i64 1
; CHECK-NEXT: store i8* %[[REGCR]], i8** %polly_launch_0_param_1
; CHECK-NEXT: %[[REGCP1:[0-9]+]] = bitcast i8** %polly_launch_0_param_1 to i8*
; CHECK-NEXT: store i8* %[[REGCP1]], i8** %[[REGGEP1]]
; CHECK-NEXT: %[[REGKERNEL:[0-9]+]] = call i8* @polly_getKernel(i8* getelementptr inbounds ([852 x i8], [852 x i8]* @FUNC_copy_SCOP_0_KERNEL_0, i32 0, i32 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @FUNC_copy_SCOP_0_KERNEL_0_name, i32 0, i32 0))
; CHECK-NEXT: call void @polly_launchKernel(i8* %[[REGKERNEL]], i32 2, i32 1, i32 32, i32 1, i32 1, i8* %polly_launch_0_params_i8ptr)
; CHECK-NEXT: call void @polly_freeKernel(i8* %[[REGKERNEL]])
; CHECK-NEXT: call void @polly_synchronizeDevice()
; CHECK-NEXT: call void @polly_freeContext(i8* %13)
; CHECK-NEXT: call void @polly_freeContext(i8* %[[REGCTX]])
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"

View File

@ -17,8 +17,8 @@
; SCOP-NEXT: [n, tmp12] -> { Stmt_for_body6[i0, i1, i2] -> MemRef_invariant[0] };
; SCOP-NEXT: Execution Context: [n, tmp12] -> { : n > 0 }
; SCOP-NEXT: }
; HOST-IR: call void @polly_launchKernel(i8* %209, i32 %215, i32 1, i32 32, i32 1, i32 1, i8* %polly_launch_0_params_i8ptr)
; HOST-IR-NEXT: call void @polly_freeKernel(i8* %209)
; HOST-IR: call void @polly_launchKernel(i8* %[[REGC:[0-9]+]], i32 %{{[0-9]+}}, i32 1, i32 32, i32 1, i32 1, i8* %polly_launch_0_params_i8ptr)
; HOST-IR-NEXT: call void @polly_freeKernel(i8* %[[REGC]])
; KERNEL-IR: define ptx_kernel void @FUNC_f_SCOP_0_KERNEL_0(i8 addrspace(1)* %MemRef_B, i8 addrspace(1)* %MemRef_A, i32 %n, i32 %tmp12, i32 %polly.preload.tmp21.merge)

View File

@ -31,7 +31,7 @@
; Check that we do not actually allocate arrays for %begin, %end, since they are
; invariant load hoisted.
; HOST-IR: %p_dev_array_MemRef_A = call i8* @polly_allocateMemoryForDevice(i64 %35)
; HOST-IR: %p_dev_array_MemRef_A = call i8* @polly_allocateMemoryForDevice
; HOST-IR-NOT: call i8* @polly_allocateMemoryForDevice
; Check that we send the invariant loaded scalars as parameters to the

View File

@ -48,7 +48,8 @@ target triple = "x86_64-unknown-linux-gnu"
; CODE-NEXT: if (32 * b0 + t0 <= 48)
; CODE-NEXT: Stmt_for_body17(0, 32 * b0 + t0);
; IR: [[REGC:%.+]] = bitcast i32* %23 to i8*
; IR-LABEL: call void @polly_freeKernel
; IR: [[REGC:%.+]] = bitcast i32* %{{[0-9]+}} to i8*
; IR-NEXT: call void @polly_copyFromDeviceToHost(i8* %p_dev_array_MemRef_c, i8* [[REGC]], i64 196)
; KERNEL-IR: define ptx_kernel void @FUNC_kernel_dynprog_SCOP_0_KERNEL_0(i8 addrspace(1)* %MemRef_c, i32) #0 {

View File

@ -27,8 +27,8 @@
; CODE-NEXT: if (arg >= 32 * b0 + t0 + 1048576 * c0 + 1)
; CODE-NEXT: Stmt_bb6(0, 32 * b0 + t0 + 1048576 * c0);
; IR: call i8* @polly_initContextCUDA()
; IR-NEXT: sext i32 %arg to i64
; IR-LABEL: call i8* @polly_initContextCUDA()
; IR: sext i32 %arg to i64
; IR-NEXT: mul i64
; IR-NEXT: @polly_allocateMemoryForDevice