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

Philip Pfaffe via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 1 06:16:39 PST 2017


Author: pfaffe
Date: Fri Dec  1 06:16:39 2017
New Revision: 319544

URL: http://llvm.org/viewvc/llvm-project?rev=319544&view=rev
Log:
[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.

Modified:
    polly/trunk/test/GPGPU/cuda-managed-memory-simple.ll
    polly/trunk/test/GPGPU/invariant-load-hoisting.ll
    polly/trunk/test/GPGPU/invariant-load-of-scalar.ll
    polly/trunk/test/GPGPU/phi-nodes-in-kernel.ll
    polly/trunk/test/GPGPU/size-cast.ll

Modified: polly/trunk/test/GPGPU/cuda-managed-memory-simple.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/GPGPU/cuda-managed-memory-simple.ll?rev=319544&r1=319543&r2=319544&view=diff
==============================================================================
--- polly/trunk/test/GPGPU/cuda-managed-memory-simple.ll (original)
+++ polly/trunk/test/GPGPU/cuda-managed-memory-simple.ll Fri Dec  1 06:16:39 2017
@@ -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"
 

Modified: polly/trunk/test/GPGPU/invariant-load-hoisting.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/GPGPU/invariant-load-hoisting.ll?rev=319544&r1=319543&r2=319544&view=diff
==============================================================================
--- polly/trunk/test/GPGPU/invariant-load-hoisting.ll (original)
+++ polly/trunk/test/GPGPU/invariant-load-hoisting.ll Fri Dec  1 06:16:39 2017
@@ -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)
 

Modified: polly/trunk/test/GPGPU/invariant-load-of-scalar.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/GPGPU/invariant-load-of-scalar.ll?rev=319544&r1=319543&r2=319544&view=diff
==============================================================================
--- polly/trunk/test/GPGPU/invariant-load-of-scalar.ll (original)
+++ polly/trunk/test/GPGPU/invariant-load-of-scalar.ll Fri Dec  1 06:16:39 2017
@@ -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

Modified: polly/trunk/test/GPGPU/phi-nodes-in-kernel.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/GPGPU/phi-nodes-in-kernel.ll?rev=319544&r1=319543&r2=319544&view=diff
==============================================================================
--- polly/trunk/test/GPGPU/phi-nodes-in-kernel.ll (original)
+++ polly/trunk/test/GPGPU/phi-nodes-in-kernel.ll Fri Dec  1 06:16:39 2017
@@ -48,7 +48,8 @@ target triple = "x86_64-unknown-linux-gn
 ; 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 {

Modified: polly/trunk/test/GPGPU/size-cast.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/GPGPU/size-cast.ll?rev=319544&r1=319543&r2=319544&view=diff
==============================================================================
--- polly/trunk/test/GPGPU/size-cast.ll (original)
+++ polly/trunk/test/GPGPU/size-cast.ll Fri Dec  1 06:16:39 2017
@@ -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
 




More information about the llvm-commits mailing list