diff options
Diffstat (limited to 'test/Transforms/SeparateConstOffsetFromGEP/NVPTX/split-gep-and-gvn.ll')
-rw-r--r-- | test/Transforms/SeparateConstOffsetFromGEP/NVPTX/split-gep-and-gvn.ll | 96 |
1 files changed, 48 insertions, 48 deletions
diff --git a/test/Transforms/SeparateConstOffsetFromGEP/NVPTX/split-gep-and-gvn.ll b/test/Transforms/SeparateConstOffsetFromGEP/NVPTX/split-gep-and-gvn.ll index d054a3b..9ee492d 100644 --- a/test/Transforms/SeparateConstOffsetFromGEP/NVPTX/split-gep-and-gvn.ll +++ b/test/Transforms/SeparateConstOffsetFromGEP/NVPTX/split-gep-and-gvn.ll @@ -21,25 +21,25 @@ define void @sum_of_array(i32 %x, i32 %y, float* nocapture %output) { .preheader: %0 = sext i32 %y to i64 %1 = sext i32 %x to i64 - %2 = getelementptr inbounds [32 x [32 x float]] addrspace(3)* @array, i64 0, i64 %1, i64 %0 + %2 = getelementptr inbounds [32 x [32 x float]], [32 x [32 x float]] addrspace(3)* @array, i64 0, i64 %1, i64 %0 %3 = addrspacecast float addrspace(3)* %2 to float* - %4 = load float* %3, align 4 + %4 = load float, float* %3, align 4 %5 = fadd float %4, 0.000000e+00 %6 = add i32 %y, 1 %7 = sext i32 %6 to i64 - %8 = getelementptr inbounds [32 x [32 x float]] addrspace(3)* @array, i64 0, i64 %1, i64 %7 + %8 = getelementptr inbounds [32 x [32 x float]], [32 x [32 x float]] addrspace(3)* @array, i64 0, i64 %1, i64 %7 %9 = addrspacecast float addrspace(3)* %8 to float* - %10 = load float* %9, align 4 + %10 = load float, float* %9, align 4 %11 = fadd float %5, %10 %12 = add i32 %x, 1 %13 = sext i32 %12 to i64 - %14 = getelementptr inbounds [32 x [32 x float]] addrspace(3)* @array, i64 0, i64 %13, i64 %0 + %14 = getelementptr inbounds [32 x [32 x float]], [32 x [32 x float]] addrspace(3)* @array, i64 0, i64 %13, i64 %0 %15 = addrspacecast float addrspace(3)* %14 to float* - %16 = load float* %15, align 4 + %16 = load float, float* %15, align 4 %17 = fadd float %11, %16 - %18 = getelementptr inbounds [32 x [32 x float]] addrspace(3)* @array, i64 0, i64 %13, i64 %7 + %18 = getelementptr inbounds [32 x [32 x float]], [32 x [32 x float]] addrspace(3)* @array, i64 0, i64 %13, i64 %7 %19 = addrspacecast float addrspace(3)* %18 to float* - %20 = load float* %19, align 4 + %20 = load float, float* %19, align 4 %21 = fadd float %17, %20 store float %21, float* %output, align 4 ret void @@ -51,10 +51,10 @@ define void @sum_of_array(i32 %x, i32 %y, float* nocapture %output) { ; PTX: ld.shared.f32 {{%f[0-9]+}}, {{\[}}[[BASE_REG]]+132{{\]}} ; IR-LABEL: @sum_of_array( -; IR: [[BASE_PTR:%[a-zA-Z0-9]+]] = getelementptr inbounds [32 x [32 x float]] addrspace(3)* @array, i64 0, i64 %{{[a-zA-Z0-9]+}}, i64 %{{[a-zA-Z0-9]+}} -; IR: getelementptr float addrspace(3)* [[BASE_PTR]], i64 1 -; IR: getelementptr float addrspace(3)* [[BASE_PTR]], i64 32 -; IR: getelementptr float addrspace(3)* [[BASE_PTR]], i64 33 +; IR: [[BASE_PTR:%[a-zA-Z0-9]+]] = getelementptr inbounds [32 x [32 x float]], [32 x [32 x float]] addrspace(3)* @array, i64 0, i64 %{{[a-zA-Z0-9]+}}, i64 %{{[a-zA-Z0-9]+}} +; IR: getelementptr float, float addrspace(3)* [[BASE_PTR]], i64 1 +; IR: getelementptr float, float addrspace(3)* [[BASE_PTR]], i64 32 +; IR: getelementptr float, float addrspace(3)* [[BASE_PTR]], i64 33 ; @sum_of_array2 is very similar to @sum_of_array. The only difference is in ; the order of "sext" and "add" when computing the array indices. @sum_of_array @@ -66,23 +66,23 @@ define void @sum_of_array2(i32 %x, i32 %y, float* nocapture %output) { .preheader: %0 = sext i32 %y to i64 %1 = sext i32 %x to i64 - %2 = getelementptr inbounds [32 x [32 x float]] addrspace(3)* @array, i64 0, i64 %1, i64 %0 + %2 = getelementptr inbounds [32 x [32 x float]], [32 x [32 x float]] addrspace(3)* @array, i64 0, i64 %1, i64 %0 %3 = addrspacecast float addrspace(3)* %2 to float* - %4 = load float* %3, align 4 + %4 = load float, float* %3, align 4 %5 = fadd float %4, 0.000000e+00 %6 = add i64 %0, 1 - %7 = getelementptr inbounds [32 x [32 x float]] addrspace(3)* @array, i64 0, i64 %1, i64 %6 + %7 = getelementptr inbounds [32 x [32 x float]], [32 x [32 x float]] addrspace(3)* @array, i64 0, i64 %1, i64 %6 %8 = addrspacecast float addrspace(3)* %7 to float* - %9 = load float* %8, align 4 + %9 = load float, float* %8, align 4 %10 = fadd float %5, %9 %11 = add i64 %1, 1 - %12 = getelementptr inbounds [32 x [32 x float]] addrspace(3)* @array, i64 0, i64 %11, i64 %0 + %12 = getelementptr inbounds [32 x [32 x float]], [32 x [32 x float]] addrspace(3)* @array, i64 0, i64 %11, i64 %0 %13 = addrspacecast float addrspace(3)* %12 to float* - %14 = load float* %13, align 4 + %14 = load float, float* %13, align 4 %15 = fadd float %10, %14 - %16 = getelementptr inbounds [32 x [32 x float]] addrspace(3)* @array, i64 0, i64 %11, i64 %6 + %16 = getelementptr inbounds [32 x [32 x float]], [32 x [32 x float]] addrspace(3)* @array, i64 0, i64 %11, i64 %6 %17 = addrspacecast float addrspace(3)* %16 to float* - %18 = load float* %17, align 4 + %18 = load float, float* %17, align 4 %19 = fadd float %15, %18 store float %19, float* %output, align 4 ret void @@ -94,10 +94,10 @@ define void @sum_of_array2(i32 %x, i32 %y, float* nocapture %output) { ; PTX: ld.shared.f32 {{%f[0-9]+}}, {{\[}}[[BASE_REG]]+132{{\]}} ; IR-LABEL: @sum_of_array2( -; IR: [[BASE_PTR:%[a-zA-Z0-9]+]] = getelementptr inbounds [32 x [32 x float]] addrspace(3)* @array, i64 0, i64 %{{[a-zA-Z0-9]+}}, i64 %{{[a-zA-Z0-9]+}} -; IR: getelementptr float addrspace(3)* [[BASE_PTR]], i64 1 -; IR: getelementptr float addrspace(3)* [[BASE_PTR]], i64 32 -; IR: getelementptr float addrspace(3)* [[BASE_PTR]], i64 33 +; IR: [[BASE_PTR:%[a-zA-Z0-9]+]] = getelementptr inbounds [32 x [32 x float]], [32 x [32 x float]] addrspace(3)* @array, i64 0, i64 %{{[a-zA-Z0-9]+}}, i64 %{{[a-zA-Z0-9]+}} +; IR: getelementptr float, float addrspace(3)* [[BASE_PTR]], i64 1 +; IR: getelementptr float, float addrspace(3)* [[BASE_PTR]], i64 32 +; IR: getelementptr float, float addrspace(3)* [[BASE_PTR]], i64 33 ; This function loads @@ -114,25 +114,25 @@ define void @sum_of_array3(i32 %x, i32 %y, float* nocapture %output) { .preheader: %0 = zext i32 %y to i64 %1 = zext i32 %x to i64 - %2 = getelementptr inbounds [32 x [32 x float]] addrspace(3)* @array, i64 0, i64 %1, i64 %0 + %2 = getelementptr inbounds [32 x [32 x float]], [32 x [32 x float]] addrspace(3)* @array, i64 0, i64 %1, i64 %0 %3 = addrspacecast float addrspace(3)* %2 to float* - %4 = load float* %3, align 4 + %4 = load float, float* %3, align 4 %5 = fadd float %4, 0.000000e+00 %6 = add nuw i32 %y, 1 %7 = zext i32 %6 to i64 - %8 = getelementptr inbounds [32 x [32 x float]] addrspace(3)* @array, i64 0, i64 %1, i64 %7 + %8 = getelementptr inbounds [32 x [32 x float]], [32 x [32 x float]] addrspace(3)* @array, i64 0, i64 %1, i64 %7 %9 = addrspacecast float addrspace(3)* %8 to float* - %10 = load float* %9, align 4 + %10 = load float, float* %9, align 4 %11 = fadd float %5, %10 %12 = add nuw i32 %x, 1 %13 = zext i32 %12 to i64 - %14 = getelementptr inbounds [32 x [32 x float]] addrspace(3)* @array, i64 0, i64 %13, i64 %0 + %14 = getelementptr inbounds [32 x [32 x float]], [32 x [32 x float]] addrspace(3)* @array, i64 0, i64 %13, i64 %0 %15 = addrspacecast float addrspace(3)* %14 to float* - %16 = load float* %15, align 4 + %16 = load float, float* %15, align 4 %17 = fadd float %11, %16 - %18 = getelementptr inbounds [32 x [32 x float]] addrspace(3)* @array, i64 0, i64 %13, i64 %7 + %18 = getelementptr inbounds [32 x [32 x float]], [32 x [32 x float]] addrspace(3)* @array, i64 0, i64 %13, i64 %7 %19 = addrspacecast float addrspace(3)* %18 to float* - %20 = load float* %19, align 4 + %20 = load float, float* %19, align 4 %21 = fadd float %17, %20 store float %21, float* %output, align 4 ret void @@ -144,10 +144,10 @@ define void @sum_of_array3(i32 %x, i32 %y, float* nocapture %output) { ; PTX: ld.shared.f32 {{%f[0-9]+}}, {{\[}}[[BASE_REG]]+132{{\]}} ; IR-LABEL: @sum_of_array3( -; IR: [[BASE_PTR:%[a-zA-Z0-9]+]] = getelementptr inbounds [32 x [32 x float]] addrspace(3)* @array, i64 0, i64 %{{[a-zA-Z0-9]+}}, i64 %{{[a-zA-Z0-9]+}} -; IR: getelementptr float addrspace(3)* [[BASE_PTR]], i64 1 -; IR: getelementptr float addrspace(3)* [[BASE_PTR]], i64 32 -; IR: getelementptr float addrspace(3)* [[BASE_PTR]], i64 33 +; IR: [[BASE_PTR:%[a-zA-Z0-9]+]] = getelementptr inbounds [32 x [32 x float]], [32 x [32 x float]] addrspace(3)* @array, i64 0, i64 %{{[a-zA-Z0-9]+}}, i64 %{{[a-zA-Z0-9]+}} +; IR: getelementptr float, float addrspace(3)* [[BASE_PTR]], i64 1 +; IR: getelementptr float, float addrspace(3)* [[BASE_PTR]], i64 32 +; IR: getelementptr float, float addrspace(3)* [[BASE_PTR]], i64 33 ; This function loads @@ -162,23 +162,23 @@ define void @sum_of_array4(i32 %x, i32 %y, float* nocapture %output) { .preheader: %0 = zext i32 %y to i64 %1 = zext i32 %x to i64 - %2 = getelementptr inbounds [32 x [32 x float]] addrspace(3)* @array, i64 0, i64 %1, i64 %0 + %2 = getelementptr inbounds [32 x [32 x float]], [32 x [32 x float]] addrspace(3)* @array, i64 0, i64 %1, i64 %0 %3 = addrspacecast float addrspace(3)* %2 to float* - %4 = load float* %3, align 4 + %4 = load float, float* %3, align 4 %5 = fadd float %4, 0.000000e+00 %6 = add i64 %0, 1 - %7 = getelementptr inbounds [32 x [32 x float]] addrspace(3)* @array, i64 0, i64 %1, i64 %6 + %7 = getelementptr inbounds [32 x [32 x float]], [32 x [32 x float]] addrspace(3)* @array, i64 0, i64 %1, i64 %6 %8 = addrspacecast float addrspace(3)* %7 to float* - %9 = load float* %8, align 4 + %9 = load float, float* %8, align 4 %10 = fadd float %5, %9 %11 = add i64 %1, 1 - %12 = getelementptr inbounds [32 x [32 x float]] addrspace(3)* @array, i64 0, i64 %11, i64 %0 + %12 = getelementptr inbounds [32 x [32 x float]], [32 x [32 x float]] addrspace(3)* @array, i64 0, i64 %11, i64 %0 %13 = addrspacecast float addrspace(3)* %12 to float* - %14 = load float* %13, align 4 + %14 = load float, float* %13, align 4 %15 = fadd float %10, %14 - %16 = getelementptr inbounds [32 x [32 x float]] addrspace(3)* @array, i64 0, i64 %11, i64 %6 + %16 = getelementptr inbounds [32 x [32 x float]], [32 x [32 x float]] addrspace(3)* @array, i64 0, i64 %11, i64 %6 %17 = addrspacecast float addrspace(3)* %16 to float* - %18 = load float* %17, align 4 + %18 = load float, float* %17, align 4 %19 = fadd float %15, %18 store float %19, float* %output, align 4 ret void @@ -190,7 +190,7 @@ define void @sum_of_array4(i32 %x, i32 %y, float* nocapture %output) { ; PTX: ld.shared.f32 {{%f[0-9]+}}, {{\[}}[[BASE_REG]]+132{{\]}} ; IR-LABEL: @sum_of_array4( -; IR: [[BASE_PTR:%[a-zA-Z0-9]+]] = getelementptr inbounds [32 x [32 x float]] addrspace(3)* @array, i64 0, i64 %{{[a-zA-Z0-9]+}}, i64 %{{[a-zA-Z0-9]+}} -; IR: getelementptr float addrspace(3)* [[BASE_PTR]], i64 1 -; IR: getelementptr float addrspace(3)* [[BASE_PTR]], i64 32 -; IR: getelementptr float addrspace(3)* [[BASE_PTR]], i64 33 +; IR: [[BASE_PTR:%[a-zA-Z0-9]+]] = getelementptr inbounds [32 x [32 x float]], [32 x [32 x float]] addrspace(3)* @array, i64 0, i64 %{{[a-zA-Z0-9]+}}, i64 %{{[a-zA-Z0-9]+}} +; IR: getelementptr float, float addrspace(3)* [[BASE_PTR]], i64 1 +; IR: getelementptr float, float addrspace(3)* [[BASE_PTR]], i64 32 +; IR: getelementptr float, float addrspace(3)* [[BASE_PTR]], i64 33 |