From 081a29fdd844ad83b6ca4b60b194274dc0fec896 Mon Sep 17 00:00:00 2001 From: Tobias Grosser Date: Sun, 18 Sep 2016 06:50:28 +0000 Subject: [PATCH] GPGPU: Make test cases independent of register numbering [NFC] git-svn-id: https://llvm.org/svn/llvm-project/polly/trunk@281847 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/GPGPU/host-control-flow.ll | 6 +++--- test/GPGPU/parametric-loop-bound.ll | 6 +++--- test/GPGPU/scalar-parameter.ll | 14 +++++++------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/test/GPGPU/host-control-flow.ll b/test/GPGPU/host-control-flow.ll index 04211c75..7597c1ce 100644 --- a/test/GPGPU/host-control-flow.ll +++ b/test/GPGPU/host-control-flow.ll @@ -32,9 +32,9 @@ ; IR-NEXT: %polly.indvar = phi i64 [ 0, %polly.loop_preheader ], [ %polly.indvar_next, %polly.loop_header ] ; ... ; IR: store i64 %polly.indvar, i64* %polly_launch_0_param_1 -; IR-NEXT: %6 = getelementptr [2 x i8*], [2 x i8*]* %polly_launch_0_params, i64 0, i64 1 -; IR-NEXT: %7 = bitcast i64* %polly_launch_0_param_1 to i8* -; IR-NEXT: store i8* %7, i8** %6 +; IR-NEXT: [[REGA:%.+]] = getelementptr [2 x i8*], [2 x i8*]* %polly_launch_0_params, i64 0, i64 1 +; IR-NEXT: [[REGB:%.+]] = bitcast i64* %polly_launch_0_param_1 to i8* +; IR-NEXT: store i8* [[REGB]], i8** [[REGA]] ; IR: call i8* @polly_getKernel ; ... ; IR: call void @polly_freeKernel diff --git a/test/GPGPU/parametric-loop-bound.ll b/test/GPGPU/parametric-loop-bound.ll index 97e7bdd4..687658ef 100644 --- a/test/GPGPU/parametric-loop-bound.ll +++ b/test/GPGPU/parametric-loop-bound.ll @@ -31,9 +31,9 @@ ; CODE-NEXT: Stmt_bb2(32 * b0 + t0 + 1048576 * c0); ; IR: store i64 %n, i64* %polly_launch_0_param_1 -; IR-NEXT: %8 = getelementptr [2 x i8*], [2 x i8*]* %polly_launch_0_params, i64 0, i64 1 -; IR-NEXT: %9 = bitcast i64* %polly_launch_0_param_1 to i8* -; IR-NEXT: store i8* %9, i8** %8 +; IR-NEXT: [[REGA:%.+]] = getelementptr [2 x i8*], [2 x i8*]* %polly_launch_0_params, i64 0, i64 1 +; IR-NEXT: [[REGB:%.+]] = bitcast i64* %polly_launch_0_param_1 to i8* +; IR-NEXT: store i8* [[REGB]], i8** [[REGA]] target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" diff --git a/test/GPGPU/scalar-parameter.ll b/test/GPGPU/scalar-parameter.ll index 46f38e95..c361f971 100644 --- a/test/GPGPU/scalar-parameter.ll +++ b/test/GPGPU/scalar-parameter.ll @@ -268,14 +268,14 @@ bb7: ; preds = %bb1 ; IR-LABEL: @i8 -; IR: %1 = call i8* @polly_getDevicePtr(i8* %p_dev_array_MemRef_A) -; IR-NEXT: %2 = getelementptr [2 x i8*], [2 x i8*]* %polly_launch_0_params, i64 0, i64 0 -; IR-NEXT: store i8* %1, i8** %polly_launch_0_param_0 -; IR-NEXT: %3 = bitcast i8** %polly_launch_0_param_0 to i8* -; IR-NEXT: store i8* %3, i8** %2 +; IR: [[REGA:%.+]] = call i8* @polly_getDevicePtr(i8* %p_dev_array_MemRef_A) +; IR-NEXT: [[REGB:%.+]] = getelementptr [2 x i8*], [2 x i8*]* %polly_launch_0_params, i64 0, i64 0 +; IR-NEXT: store i8* [[REGA:%.+]], i8** %polly_launch_0_param_0 +; IR-NEXT: [[REGC:%.+]] = bitcast i8** %polly_launch_0_param_0 to i8* +; IR-NEXT: store i8* [[REGC]], i8** [[REGB]] ; IR-NEXT: store i8 %b, i8* %polly_launch_0_param_1 -; IR-NEXT: %4 = getelementptr [2 x i8*], [2 x i8*]* %polly_launch_0_params, i64 0, i64 1 -; IR-NEXT: store i8* %polly_launch_0_param_1, i8** %4 +; IR-NEXT: [[REGD:%.+]] = getelementptr [2 x i8*], [2 x i8*]* %polly_launch_0_params, i64 0, i64 1 +; IR-NEXT: store i8* %polly_launch_0_param_1, i8** [[REGD]] ; CODE: Code ; CODE-NEXT: ==== -- 2.11.4.GIT