[llvm] b7587ca - AMDGPU: Add more opencl printf tests
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 6 18:31:04 PST 2023
Author: Matt Arsenault
Date: 2023-01-06T21:23:14-05:00
New Revision: b7587ca8377572ff45ce80aa070ac7a3aadde431
URL: https://github.com/llvm/llvm-project/commit/b7587ca8377572ff45ce80aa070ac7a3aadde431
DIFF: https://github.com/llvm/llvm-project/commit/b7587ca8377572ff45ce80aa070ac7a3aadde431.diff
LOG: AMDGPU: Add more opencl printf tests
Added:
Modified:
llvm/test/CodeGen/AMDGPU/opencl-printf.ll
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/AMDGPU/opencl-printf.ll b/llvm/test/CodeGen/AMDGPU/opencl-printf.ll
index b300ec268bd3..d974a06f00d5 100644
--- a/llvm/test/CodeGen/AMDGPU/opencl-printf.ll
+++ b/llvm/test/CodeGen/AMDGPU/opencl-printf.ll
@@ -32,7 +32,542 @@
@printed.str.float.0 = private addrspace(4) constant float 0.0, align 4
@printed.str.ptr.null = private addrspace(4) constant ptr null, align 4
@printed.str.ptr.undef = private addrspace(4) constant ptr undef, align 4
+ at format.str.f = private unnamed_addr addrspace(4) constant [30 x i8] c"%f %f %f %f %f %f %f %f %f %f\00", align 1
+ at format.str.p = private unnamed_addr addrspace(4) constant [15 x i8] c"%p %p %p %p %p\00", align 1
+ at format.str.d = private unnamed_addr addrspace(4) constant [30 x i8] c"%d %d %d %d %d %d %d %d %d %d\00", align 1
+ at format.str.v1 = private unnamed_addr addrspace(4) constant [35 x i8] c"%v1f %v1f %v1d %v1d %v1p %v1p %v1f\00", align 1
+ at format.str.v2 = private unnamed_addr addrspace(4) constant [35 x i8] c"%v2f %v2f %v2d %v2d %v2p %v2p %v2f\00", align 1
+ at format.str.v3 = private unnamed_addr addrspace(4) constant [35 x i8] c"%v3f %v3f %v3d %v3d %v3p %v3p %v3f\00", align 1
+ at format.str.v4 = private unnamed_addr addrspace(4) constant [35 x i8] c"%v4f %v4f %v4d %v4d %v4p %v4p %v4f\00", align 1
+ at format.str.v8 = private unnamed_addr addrspace(4) constant [35 x i8] c"%v8f %v8f %v8d %v8d %v8p %v8p %v8f\00", align 1
+ at format.str.v16 = private unnamed_addr addrspace(4) constant [42 x i8] c"%v16f %v16f %v16d %v16d %v16p %v16p %v16f\00", align 1
+ at format.str.u = private unnamed_addr addrspace(4) constant [30 x i8] c"%u %u %u %u %u %u %u %u %u %u\00", align 1
+
+
+; FIXME: Crashes on half
+define amdgpu_kernel void @format_str_f(float %f32.0, double %f64, float %f32.1, i16 %i16, i32 %i32, i64 %i64) {
+; R600-LABEL: @format_str_f(
+; R600-NEXT: [[FPEXT_F32_TO_F64:%.*]] = fpext float [[F32_1:%.*]] to double
+; R600-NEXT: [[CALL1:%.*]] = call i32 @printf(ptr addrspace(4) @format.str.f, float [[F32_0:%.*]], double [[F64:%.*]], double [[FPEXT_F32_TO_F64]], float 1.000000e+00, double 2.000000e+00, i16 [[I16:%.*]], i32 [[I32:%.*]], i64 [[I64:%.*]], <2 x float> <float 1.000000e+00, float 2.000000e+00>, <2 x i32> <i32 8, i32 234>)
+; R600-NEXT: ret void
+;
+; GCN-LABEL: @format_str_f(
+; GCN-NEXT: [[FPEXT_F32_TO_F64:%.*]] = fpext float [[F32_1:%.*]] to double
+; GCN-NEXT: [[TMP1:%.*]] = sext i16 [[I16:%.*]] to i32
+; GCN-NEXT: [[PRINTF_ALLOC_FN:%.*]] = call ptr addrspace(1) @__printf_alloc(i32 60)
+; GCN-NEXT: br label [[DOTSPLIT:%.*]]
+; GCN: .split:
+; GCN-NEXT: [[TMP2:%.*]] = icmp ne ptr addrspace(1) [[PRINTF_ALLOC_FN]], null
+; GCN-NEXT: br i1 [[TMP2]], label [[TMP3:%.*]], label [[TMP4:%.*]]
+; GCN: 3:
+; GCN-NEXT: [[PRINTBUFFID:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 0
+; GCN-NEXT: [[PRINTBUFFIDCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFID]] to ptr addrspace(1)
+; GCN-NEXT: store i32 1, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
+; GCN-NEXT: [[PRINTBUFFGEP:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 4
+; GCN-NEXT: [[PRINTARGFP:%.*]] = bitcast float [[F32_0:%.*]] to i32
+; GCN-NEXT: [[PRINTBUFFPTRCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFGEP]] to ptr addrspace(1)
+; GCN-NEXT: store i32 [[PRINTARGFP]], ptr addrspace(1) [[PRINTBUFFPTRCAST]], align 4
+; GCN-NEXT: [[PRINTBUFFNEXTPTR:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFGEP]], i32 4
+; GCN-NEXT: [[PRINTARGFP1:%.*]] = bitcast double [[F64:%.*]] to i64
+; GCN-NEXT: [[PRINTBUFFPTRCAST2:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR]] to ptr addrspace(1)
+; GCN-NEXT: store i64 [[PRINTARGFP1]], ptr addrspace(1) [[PRINTBUFFPTRCAST2]], align 4
+; GCN-NEXT: [[PRINTBUFFNEXTPTR3:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR]], i32 8
+; GCN-NEXT: [[PRINTARGFP4:%.*]] = bitcast float [[F32_1]] to i32
+; GCN-NEXT: [[PRINTBUFFPTRCAST5:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR3]] to ptr addrspace(1)
+; GCN-NEXT: store i32 [[PRINTARGFP4]], ptr addrspace(1) [[PRINTBUFFPTRCAST5]], align 4
+; GCN-NEXT: [[PRINTBUFFNEXTPTR6:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR3]], i32 4
+; GCN-NEXT: [[PRINTARGFP7:%.*]] = bitcast float 1.000000e+00 to i32
+; GCN-NEXT: [[PRINTBUFFPTRCAST8:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR6]] to ptr addrspace(1)
+; GCN-NEXT: store i32 [[PRINTARGFP7]], ptr addrspace(1) [[PRINTBUFFPTRCAST8]], align 4
+; GCN-NEXT: [[PRINTBUFFNEXTPTR9:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR6]], i32 4
+; GCN-NEXT: [[PRINTARGFP10:%.*]] = bitcast float 2.000000e+00 to i32
+; GCN-NEXT: [[PRINTBUFFPTRCAST11:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR9]] to ptr addrspace(1)
+; GCN-NEXT: store i32 [[PRINTARGFP10]], ptr addrspace(1) [[PRINTBUFFPTRCAST11]], align 4
+; GCN-NEXT: [[PRINTBUFFNEXTPTR12:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR9]], i32 4
+; GCN-NEXT: [[PRINTBUFFPTRCAST13:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR12]] to ptr addrspace(1)
+; GCN-NEXT: store i32 [[TMP1]], ptr addrspace(1) [[PRINTBUFFPTRCAST13]], align 4
+; GCN-NEXT: [[PRINTBUFFNEXTPTR14:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR12]], i32 4
+; GCN-NEXT: [[PRINTBUFFPTRCAST15:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR14]] to ptr addrspace(1)
+; GCN-NEXT: store i32 [[I32:%.*]], ptr addrspace(1) [[PRINTBUFFPTRCAST15]], align 4
+; GCN-NEXT: [[PRINTBUFFNEXTPTR16:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR14]], i32 4
+; GCN-NEXT: [[PRINTBUFFPTRCAST17:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR16]] to ptr addrspace(1)
+; GCN-NEXT: store i64 [[I64:%.*]], ptr addrspace(1) [[PRINTBUFFPTRCAST17]], align 4
+; GCN-NEXT: [[PRINTBUFFNEXTPTR18:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR16]], i32 8
+; GCN-NEXT: [[PRINTARGVECT:%.*]] = bitcast <2 x float> <float 1.000000e+00, float 2.000000e+00> to i64
+; GCN-NEXT: [[PRINTBUFFPTRCAST19:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR18]] to ptr addrspace(1)
+; GCN-NEXT: store i64 [[PRINTARGVECT]], ptr addrspace(1) [[PRINTBUFFPTRCAST19]], align 4
+; GCN-NEXT: [[PRINTBUFFNEXTPTR20:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR18]], i32 8
+; GCN-NEXT: [[PRINTARGVECT21:%.*]] = bitcast <2 x i32> <i32 8, i32 234> to i64
+; GCN-NEXT: [[PRINTBUFFPTRCAST22:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR20]] to ptr addrspace(1)
+; GCN-NEXT: store i64 [[PRINTARGVECT21]], ptr addrspace(1) [[PRINTBUFFPTRCAST22]], align 4
+; GCN-NEXT: br label [[TMP4]]
+; GCN: 4:
+; GCN-NEXT: ret void
+;
+ %fpext.f32.to.f64 = fpext float %f32.1 to double
+ %call1 = call i32 @printf(ptr addrspace(4) @format.str.f, float %f32.0, double %f64, double %fpext.f32.to.f64, float 1.0, double 2.0, i16 %i16, i32 %i32, i64 %i64, <2 x float> <float 1.0, float 2.0>, <2 x i32> <i32 8, i32 234>)
+ ret void
+}
+
+define void @format_str_ptr(ptr %ptr.flat, ptr addrspace(3) %ptr.lds, ptr addrspace(1) %ptr.global, ptr addrspace(5) %ptr.stack, ptr addrspace(4) %ptr.const) {
+; R600-LABEL: @format_str_ptr(
+; R600-NEXT: [[CALL:%.*]] = call i32 @printf(ptr addrspace(4) @format.str.p, ptr [[PTR_FLAT:%.*]], ptr addrspace(3) [[PTR_LDS:%.*]], ptr addrspace(1) [[PTR_GLOBAL:%.*]], ptr addrspace(5) [[PTR_STACK:%.*]], ptr addrspace(4) [[PTR_CONST:%.*]])
+; R600-NEXT: ret void
+;
+; GCN-LABEL: @format_str_ptr(
+; GCN-NEXT: [[PRINTF_ALLOC_FN:%.*]] = call ptr addrspace(1) @__printf_alloc(i32 44)
+; GCN-NEXT: br label [[DOTSPLIT:%.*]]
+; GCN: .split:
+; GCN-NEXT: [[TMP1:%.*]] = icmp ne ptr addrspace(1) [[PRINTF_ALLOC_FN]], null
+; GCN-NEXT: br i1 [[TMP1]], label [[TMP2:%.*]], label [[TMP3:%.*]]
+; GCN: 2:
+; GCN-NEXT: [[PRINTBUFFID:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 0
+; GCN-NEXT: [[PRINTBUFFIDCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFID]] to ptr addrspace(1)
+; GCN-NEXT: store i32 2, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
+; GCN-NEXT: [[PRINTBUFFGEP:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 4
+; GCN-NEXT: [[PRINTARGPTR:%.*]] = ptrtoint ptr [[PTR_FLAT:%.*]] to i64
+; GCN-NEXT: [[PRINTBUFFPTRCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFGEP]] to ptr addrspace(1)
+; GCN-NEXT: store i64 [[PRINTARGPTR]], ptr addrspace(1) [[PRINTBUFFPTRCAST]], align 4
+; GCN-NEXT: [[PRINTBUFFNEXTPTR:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFGEP]], i32 8
+; GCN-NEXT: [[PRINTARGPTR1:%.*]] = ptrtoint ptr addrspace(3) [[PTR_LDS:%.*]] to i64
+; GCN-NEXT: [[PRINTBUFFPTRCAST2:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR]] to ptr addrspace(1)
+; GCN-NEXT: store i64 [[PRINTARGPTR1]], ptr addrspace(1) [[PRINTBUFFPTRCAST2]], align 4
+; GCN-NEXT: [[PRINTBUFFNEXTPTR3:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR]], i32 8
+; GCN-NEXT: [[PRINTARGPTR4:%.*]] = ptrtoint ptr addrspace(1) [[PTR_GLOBAL:%.*]] to i64
+; GCN-NEXT: [[PRINTBUFFPTRCAST5:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR3]] to ptr addrspace(1)
+; GCN-NEXT: store i64 [[PRINTARGPTR4]], ptr addrspace(1) [[PRINTBUFFPTRCAST5]], align 4
+; GCN-NEXT: [[PRINTBUFFNEXTPTR6:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR3]], i32 8
+; GCN-NEXT: [[PRINTARGPTR7:%.*]] = ptrtoint ptr addrspace(5) [[PTR_STACK:%.*]] to i64
+; GCN-NEXT: [[PRINTBUFFPTRCAST8:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR6]] to ptr addrspace(1)
+; GCN-NEXT: store i64 [[PRINTARGPTR7]], ptr addrspace(1) [[PRINTBUFFPTRCAST8]], align 4
+; GCN-NEXT: [[PRINTBUFFNEXTPTR9:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR6]], i32 8
+; GCN-NEXT: [[PRINTARGPTR10:%.*]] = ptrtoint ptr addrspace(4) [[PTR_CONST:%.*]] to i64
+; GCN-NEXT: [[PRINTBUFFPTRCAST11:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR9]] to ptr addrspace(1)
+; GCN-NEXT: store i64 [[PRINTARGPTR10]], ptr addrspace(1) [[PRINTBUFFPTRCAST11]], align 4
+; GCN-NEXT: br label [[TMP3]]
+; GCN: 3:
+; GCN-NEXT: ret void
+;
+ %call = call i32 @printf(ptr addrspace(4) @format.str.p, ptr %ptr.flat, ptr addrspace(3) %ptr.lds, ptr addrspace(1) %ptr.global, ptr addrspace(5) %ptr.stack, ptr addrspace(4) %ptr.const)
+ ret void
+}
+
+define amdgpu_kernel void @format_str_d(i1 %i1, i4 %i4, i8 %i8, i24 %i24, i16 %i16, i32 %i32, i64 %i64, i96 %i96, i128 %i128) {
+; R600-LABEL: @format_str_d(
+; R600-NEXT: [[CALL:%.*]] = call i32 @printf(ptr addrspace(4) @format.str.d, i1 [[I1:%.*]], i4 [[I4:%.*]], i8 [[I8:%.*]], i24 [[I24:%.*]], i16 [[I16:%.*]], i32 [[I32:%.*]], i64 [[I64:%.*]], i96 [[I96:%.*]], i128 [[I128:%.*]], i32 1234)
+; R600-NEXT: ret void
+;
+; GCN-LABEL: @format_str_d(
+; GCN-NEXT: [[TMP1:%.*]] = sext i1 [[I1:%.*]] to i32
+; GCN-NEXT: [[TMP2:%.*]] = sext i4 [[I4:%.*]] to i32
+; GCN-NEXT: [[TMP3:%.*]] = sext i8 [[I8:%.*]] to i32
+; GCN-NEXT: [[TMP4:%.*]] = sext i16 [[I16:%.*]] to i32
+; GCN-NEXT: [[PRINTF_ALLOC_FN:%.*]] = call ptr addrspace(1) @__printf_alloc(i32 68)
+; GCN-NEXT: br label [[DOTSPLIT:%.*]]
+; GCN: .split:
+; GCN-NEXT: [[TMP5:%.*]] = icmp ne ptr addrspace(1) [[PRINTF_ALLOC_FN]], null
+; GCN-NEXT: br i1 [[TMP5]], label [[TMP6:%.*]], label [[TMP7:%.*]]
+; GCN: 6:
+; GCN-NEXT: [[PRINTBUFFID:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 0
+; GCN-NEXT: [[PRINTBUFFIDCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFID]] to ptr addrspace(1)
+; GCN-NEXT: store i32 3, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
+; GCN-NEXT: [[PRINTBUFFGEP:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 4
+; GCN-NEXT: [[PRINTBUFFPTRCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFGEP]] to ptr addrspace(1)
+; GCN-NEXT: store i32 [[TMP1]], ptr addrspace(1) [[PRINTBUFFPTRCAST]], align 4
+; GCN-NEXT: [[PRINTBUFFNEXTPTR:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFGEP]], i32 4
+; GCN-NEXT: [[PRINTBUFFPTRCAST1:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR]] to ptr addrspace(1)
+; GCN-NEXT: store i32 [[TMP2]], ptr addrspace(1) [[PRINTBUFFPTRCAST1]], align 4
+; GCN-NEXT: [[PRINTBUFFNEXTPTR2:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR]], i32 4
+; GCN-NEXT: [[PRINTBUFFPTRCAST3:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR2]] to ptr addrspace(1)
+; GCN-NEXT: store i32 [[TMP3]], ptr addrspace(1) [[PRINTBUFFPTRCAST3]], align 4
+; GCN-NEXT: [[PRINTBUFFNEXTPTR4:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR2]], i32 4
+; GCN-NEXT: [[PRINTBUFFPTRCAST5:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR4]] to ptr addrspace(1)
+; GCN-NEXT: store i24 [[I24:%.*]], ptr addrspace(1) [[PRINTBUFFPTRCAST5]], align 4
+; GCN-NEXT: [[PRINTBUFFNEXTPTR6:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR4]], i32 4
+; GCN-NEXT: [[PRINTBUFFPTRCAST7:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR6]] to ptr addrspace(1)
+; GCN-NEXT: store i32 [[TMP4]], ptr addrspace(1) [[PRINTBUFFPTRCAST7]], align 4
+; GCN-NEXT: [[PRINTBUFFNEXTPTR8:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR6]], i32 4
+; GCN-NEXT: [[PRINTBUFFPTRCAST9:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR8]] to ptr addrspace(1)
+; GCN-NEXT: store i32 [[I32:%.*]], ptr addrspace(1) [[PRINTBUFFPTRCAST9]], align 4
+; GCN-NEXT: [[PRINTBUFFNEXTPTR10:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR8]], i32 4
+; GCN-NEXT: [[PRINTBUFFPTRCAST11:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR10]] to ptr addrspace(1)
+; GCN-NEXT: store i64 [[I64:%.*]], ptr addrspace(1) [[PRINTBUFFPTRCAST11]], align 4
+; GCN-NEXT: [[PRINTBUFFNEXTPTR12:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR10]], i32 8
+; GCN-NEXT: [[PRINTBUFFPTRCAST13:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR12]] to ptr addrspace(1)
+; GCN-NEXT: store i96 [[I96:%.*]], ptr addrspace(1) [[PRINTBUFFPTRCAST13]], align 4
+; GCN-NEXT: [[PRINTBUFFNEXTPTR14:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR12]], i32 12
+; GCN-NEXT: [[PRINTBUFFPTRCAST15:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR14]] to ptr addrspace(1)
+; GCN-NEXT: store i128 [[I128:%.*]], ptr addrspace(1) [[PRINTBUFFPTRCAST15]], align 4
+; GCN-NEXT: [[PRINTBUFFNEXTPTR16:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR14]], i32 16
+; GCN-NEXT: [[PRINTBUFFPTRCAST17:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR16]] to ptr addrspace(1)
+; GCN-NEXT: store i32 1234, ptr addrspace(1) [[PRINTBUFFPTRCAST17]], align 4
+; GCN-NEXT: br label [[TMP7]]
+; GCN: 7:
+; GCN-NEXT: ret void
+;
+ %call = call i32 @printf(ptr addrspace(4) @format.str.d, i1 %i1, i4 %i4, i8 %i8, i24 %i24, i16 %i16, i32 %i32, i64 %i64, i96 %i96, i128 %i128, i32 1234)
+ ret void
+}
+
+define amdgpu_kernel void @format_str_u(i1 %i1, i4 %i4, i8 %i8, i24 %i24, i16 %i16, i32 %i32, i64 %i64, i96 %i96, i128 %i128) {
+; R600-LABEL: @format_str_u(
+; R600-NEXT: [[CALL:%.*]] = call i32 @printf(ptr addrspace(4) @format.str.u, i1 [[I1:%.*]], i4 [[I4:%.*]], i8 [[I8:%.*]], i24 [[I24:%.*]], i16 [[I16:%.*]], i32 [[I32:%.*]], i64 [[I64:%.*]], i96 [[I96:%.*]], i128 [[I128:%.*]], i32 1234)
+; R600-NEXT: ret void
+;
+; GCN-LABEL: @format_str_u(
+; GCN-NEXT: [[TMP1:%.*]] = zext i1 [[I1:%.*]] to i32
+; GCN-NEXT: [[TMP2:%.*]] = zext i4 [[I4:%.*]] to i32
+; GCN-NEXT: [[TMP3:%.*]] = zext i8 [[I8:%.*]] to i32
+; GCN-NEXT: [[TMP4:%.*]] = zext i16 [[I16:%.*]] to i32
+; GCN-NEXT: [[PRINTF_ALLOC_FN:%.*]] = call ptr addrspace(1) @__printf_alloc(i32 68)
+; GCN-NEXT: br label [[DOTSPLIT:%.*]]
+; GCN: .split:
+; GCN-NEXT: [[TMP5:%.*]] = icmp ne ptr addrspace(1) [[PRINTF_ALLOC_FN]], null
+; GCN-NEXT: br i1 [[TMP5]], label [[TMP6:%.*]], label [[TMP7:%.*]]
+; GCN: 6:
+; GCN-NEXT: [[PRINTBUFFID:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 0
+; GCN-NEXT: [[PRINTBUFFIDCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFID]] to ptr addrspace(1)
+; GCN-NEXT: store i32 4, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
+; GCN-NEXT: [[PRINTBUFFGEP:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 4
+; GCN-NEXT: [[PRINTBUFFPTRCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFGEP]] to ptr addrspace(1)
+; GCN-NEXT: store i32 [[TMP1]], ptr addrspace(1) [[PRINTBUFFPTRCAST]], align 4
+; GCN-NEXT: [[PRINTBUFFNEXTPTR:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFGEP]], i32 4
+; GCN-NEXT: [[PRINTBUFFPTRCAST1:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR]] to ptr addrspace(1)
+; GCN-NEXT: store i32 [[TMP2]], ptr addrspace(1) [[PRINTBUFFPTRCAST1]], align 4
+; GCN-NEXT: [[PRINTBUFFNEXTPTR2:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR]], i32 4
+; GCN-NEXT: [[PRINTBUFFPTRCAST3:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR2]] to ptr addrspace(1)
+; GCN-NEXT: store i32 [[TMP3]], ptr addrspace(1) [[PRINTBUFFPTRCAST3]], align 4
+; GCN-NEXT: [[PRINTBUFFNEXTPTR4:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR2]], i32 4
+; GCN-NEXT: [[PRINTBUFFPTRCAST5:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR4]] to ptr addrspace(1)
+; GCN-NEXT: store i24 [[I24:%.*]], ptr addrspace(1) [[PRINTBUFFPTRCAST5]], align 4
+; GCN-NEXT: [[PRINTBUFFNEXTPTR6:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR4]], i32 4
+; GCN-NEXT: [[PRINTBUFFPTRCAST7:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR6]] to ptr addrspace(1)
+; GCN-NEXT: store i32 [[TMP4]], ptr addrspace(1) [[PRINTBUFFPTRCAST7]], align 4
+; GCN-NEXT: [[PRINTBUFFNEXTPTR8:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR6]], i32 4
+; GCN-NEXT: [[PRINTBUFFPTRCAST9:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR8]] to ptr addrspace(1)
+; GCN-NEXT: store i32 [[I32:%.*]], ptr addrspace(1) [[PRINTBUFFPTRCAST9]], align 4
+; GCN-NEXT: [[PRINTBUFFNEXTPTR10:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR8]], i32 4
+; GCN-NEXT: [[PRINTBUFFPTRCAST11:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR10]] to ptr addrspace(1)
+; GCN-NEXT: store i64 [[I64:%.*]], ptr addrspace(1) [[PRINTBUFFPTRCAST11]], align 4
+; GCN-NEXT: [[PRINTBUFFNEXTPTR12:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR10]], i32 8
+; GCN-NEXT: [[PRINTBUFFPTRCAST13:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR12]] to ptr addrspace(1)
+; GCN-NEXT: store i96 [[I96:%.*]], ptr addrspace(1) [[PRINTBUFFPTRCAST13]], align 4
+; GCN-NEXT: [[PRINTBUFFNEXTPTR14:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR12]], i32 12
+; GCN-NEXT: [[PRINTBUFFPTRCAST15:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR14]] to ptr addrspace(1)
+; GCN-NEXT: store i128 [[I128:%.*]], ptr addrspace(1) [[PRINTBUFFPTRCAST15]], align 4
+; GCN-NEXT: [[PRINTBUFFNEXTPTR16:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR14]], i32 16
+; GCN-NEXT: [[PRINTBUFFPTRCAST17:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR16]] to ptr addrspace(1)
+; GCN-NEXT: store i32 1234, ptr addrspace(1) [[PRINTBUFFPTRCAST17]], align 4
+; GCN-NEXT: br label [[TMP7]]
+; GCN: 7:
+; GCN-NEXT: ret void
+;
+ %call = call i32 @printf(ptr addrspace(4) @format.str.u, i1 %i1, i4 %i4, i8 %i8, i24 %i24, i16 %i16, i32 %i32, i64 %i64, i96 %i96, i128 %i128, i32 1234)
+ ret void
+}
+
+; FIXME: Crashes
+; define void @format_str_v1(<1 x float> %v1f32.0, <1 x float> %v1f32.1, <1 x double> %v1f64, <1 x i8> %v1i8, <1 x i16> %v1i16, <1 x i32> %v1i32, <1 x i64> %v1i64,
+; <1 x ptr addrspace(1)> %v1p1, <1 x ptr addrspace(3)> %v1p3, <1 x half> %v1f16) {
+; %v1f32.1.fpext = fpext <1 x float> %v1f32.1 to <1 x double>
+; %call1 = call i32 @printf(ptr addrspace(4) @format.str.v1, <1 x float> %v1f32.0, <1 x double> %v1f32.1.fpext, <1 x double> %v1f64, <1 x i8> %v1i8, <1 x i16> %v1i16, <1 x i32> %v1i32, <1 x i64> %v1i64,
+; <1 x ptr addrspace(1)> %v1p1, <1 x ptr addrspace(3)> %v1p3, <1 x half> %v1f16)
+; ret void
+; }
+
+define void @format_str_v2(<2 x float> %v2f32.0, <2 x float> %v2f32.1, <2 x double> %v2f64, <2 x i8> %v2i8, <2 x i16> %v2i16, <2 x i32> %v2i32, <2 x i64> %v2i64,
+; R600-LABEL: @format_str_v2(
+; R600-NEXT: [[V2F32_1_FPEXT:%.*]] = fpext <2 x float> [[V2F32_1:%.*]] to <2 x double>
+; R600-NEXT: [[CALL1:%.*]] = call i32 @printf(ptr addrspace(4) @format.str.v2, <2 x float> [[V2F32_0:%.*]], <2 x double> [[V2F32_1_FPEXT]], <2 x double> [[V2F64:%.*]], <2 x i8> [[V2I8:%.*]], <2 x i16> [[V2I16:%.*]], <2 x i32> [[V2I32:%.*]], <2 x i64> [[V2I64:%.*]], <2 x ptr addrspace(1)> [[V2P1:%.*]], <2 x ptr addrspace(3)> [[V2P3:%.*]], <2 x half> [[V2F16:%.*]])
+; R600-NEXT: ret void
+;
+; GCN-LABEL: @format_str_v2(
+; GCN-NEXT: [[V2F32_1_FPEXT:%.*]] = fpext <2 x float> [[V2F32_1:%.*]] to <2 x double>
+; GCN-NEXT: [[TMP1:%.*]] = sext <2 x i8> [[V2I8:%.*]] to <2 x i32>
+; GCN-NEXT: [[PRINTF_ALLOC_FN:%.*]] = call ptr addrspace(1) @__printf_alloc(i32 80)
+; GCN-NEXT: br label [[DOTSPLIT:%.*]]
+; GCN: .split:
+; GCN-NEXT: [[TMP2:%.*]] = icmp ne ptr addrspace(1) [[PRINTF_ALLOC_FN]], null
+; GCN-NEXT: br i1 [[TMP2]], label [[TMP3:%.*]], label [[TMP4:%.*]]
+; GCN: 3:
+; GCN-NEXT: [[PRINTBUFFID:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 0
+; GCN-NEXT: [[PRINTBUFFIDCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFID]] to ptr addrspace(1)
+; GCN-NEXT: store i32 5, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
+; GCN-NEXT: [[PRINTBUFFGEP:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 4
+; GCN-NEXT: [[PRINTARGVECT:%.*]] = bitcast <2 x float> [[V2F32_0:%.*]] to i64
+; GCN-NEXT: [[PRINTBUFFPTRCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFGEP]] to ptr addrspace(1)
+; GCN-NEXT: store i64 [[PRINTARGVECT]], ptr addrspace(1) [[PRINTBUFFPTRCAST]], align 4
+; GCN-NEXT: [[PRINTBUFFNEXTPTR:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFGEP]], i32 8
+; GCN-NEXT: [[PRINTARGVECT1:%.*]] = bitcast <2 x double> [[V2F32_1_FPEXT]] to <2 x i64>
+; GCN-NEXT: [[PRINTBUFFPTRCAST2:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR]] to ptr addrspace(1)
+; GCN-NEXT: store <2 x i64> [[PRINTARGVECT1]], ptr addrspace(1) [[PRINTBUFFPTRCAST2]], align 16
+; GCN-NEXT: [[PRINTBUFFNEXTPTR3:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR]], i32 16
+; GCN-NEXT: [[PRINTARGVECT4:%.*]] = bitcast <2 x double> [[V2F64:%.*]] to <2 x i64>
+; GCN-NEXT: [[PRINTBUFFPTRCAST5:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR3]] to ptr addrspace(1)
+; GCN-NEXT: store <2 x i64> [[PRINTARGVECT4]], ptr addrspace(1) [[PRINTBUFFPTRCAST5]], align 16
+; GCN-NEXT: [[PRINTBUFFNEXTPTR6:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR3]], i32 16
+; GCN-NEXT: [[PRINTARGVECT7:%.*]] = bitcast <2 x i32> [[TMP1]] to i64
+; GCN-NEXT: [[PRINTBUFFPTRCAST8:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR6]] to ptr addrspace(1)
+; GCN-NEXT: store i64 [[PRINTARGVECT7]], ptr addrspace(1) [[PRINTBUFFPTRCAST8]], align 4
+; GCN-NEXT: [[PRINTBUFFNEXTPTR9:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR6]], i32 8
+; GCN-NEXT: [[PRINTARGVECT10:%.*]] = bitcast <2 x i16> [[V2I16:%.*]] to i32
+; GCN-NEXT: [[PRINTBUFFPTRCAST11:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR9]] to ptr addrspace(1)
+; GCN-NEXT: store i32 [[PRINTARGVECT10]], ptr addrspace(1) [[PRINTBUFFPTRCAST11]], align 4
+; GCN-NEXT: [[PRINTBUFFNEXTPTR12:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR9]], i32 4
+; GCN-NEXT: [[PRINTARGVECT13:%.*]] = bitcast <2 x i32> [[V2I32:%.*]] to i64
+; GCN-NEXT: [[PRINTBUFFPTRCAST14:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR12]] to ptr addrspace(1)
+; GCN-NEXT: store i64 [[PRINTARGVECT13]], ptr addrspace(1) [[PRINTBUFFPTRCAST14]], align 4
+; GCN-NEXT: [[PRINTBUFFNEXTPTR15:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR12]], i32 8
+; GCN-NEXT: [[PRINTARGVECT16:%.*]] = bitcast <2 x i64> [[V2I64:%.*]] to <2 x i64>
+; GCN-NEXT: [[PRINTBUFFPTRCAST17:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR15]] to ptr addrspace(1)
+; GCN-NEXT: store <2 x i64> [[PRINTARGVECT16]], ptr addrspace(1) [[PRINTBUFFPTRCAST17]], align 16
+; GCN-NEXT: [[PRINTBUFFNEXTPTR18:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR15]], i32 16
+; GCN-NEXT: br label [[TMP4]]
+; GCN: 4:
+; GCN-NEXT: ret void
+;
+ <2 x ptr addrspace(1)> %v2p1, <2 x ptr addrspace(3)> %v2p3, <2 x half> %v2f16) {
+ %v2f32.1.fpext = fpext <2 x float> %v2f32.1 to <2 x double>
+ %call1 = call i32 @printf(ptr addrspace(4) @format.str.v2, <2 x float> %v2f32.0, <2 x double> %v2f32.1.fpext, <2 x double> %v2f64, <2 x i8> %v2i8, <2 x i16> %v2i16, <2 x i32> %v2i32, <2 x i64> %v2i64,
+ <2 x ptr addrspace(1)> %v2p1, <2 x ptr addrspace(3)> %v2p3, <2 x half> %v2f16)
+ ret void
+}
+
+define void @format_str_v3(<3 x float> %v3f32.0, <3 x float> %v3f32.1, <3 x double> %v3f64, <3 x i8> %v3i8, <3 x i16> %v3i16, <3 x i32> %v3i32, <3 x i64> %v3i64,
+; R600-LABEL: @format_str_v3(
+; R600-NEXT: [[V3F32_1_FPEXT:%.*]] = fpext <3 x float> [[V3F32_1:%.*]] to <3 x double>
+; R600-NEXT: [[CALL1:%.*]] = call i32 @printf(ptr addrspace(4) @format.str.v3, <3 x float> [[V3F32_0:%.*]], <3 x double> [[V3F32_1_FPEXT]], <3 x double> [[V3F64:%.*]], <3 x i8> [[V3I8:%.*]], <3 x i16> [[V3I16:%.*]], <3 x i32> [[V3I32:%.*]], <3 x i64> [[V3I64:%.*]], <3 x ptr addrspace(1)> [[V3P1:%.*]], <3 x ptr addrspace(3)> [[V3P3:%.*]], <3 x half> [[V3F16:%.*]])
+; R600-NEXT: ret void
+;
+; GCN-LABEL: @format_str_v3(
+; GCN-NEXT: [[V3F32_1_FPEXT:%.*]] = fpext <3 x float> [[V3F32_1:%.*]] to <3 x double>
+; GCN-NEXT: [[PRINTF_ALLOC_FN:%.*]] = call ptr addrspace(1) @__printf_alloc(i32 144)
+; GCN-NEXT: br label [[DOTSPLIT:%.*]]
+; GCN: .split:
+; GCN-NEXT: [[TMP1:%.*]] = icmp ne ptr addrspace(1) [[PRINTF_ALLOC_FN]], null
+; GCN-NEXT: br i1 [[TMP1]], label [[TMP2:%.*]], label [[TMP10:%.*]]
+; GCN: 2:
+; GCN-NEXT: [[PRINTBUFFID:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 0
+; GCN-NEXT: [[PRINTBUFFIDCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFID]] to ptr addrspace(1)
+; GCN-NEXT: store i32 6, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
+; GCN-NEXT: [[PRINTBUFFGEP:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 4
+; GCN-NEXT: [[TMP3:%.*]] = shufflevector <3 x float> [[V3F32_0:%.*]], <3 x float> [[V3F32_0]], <4 x i32> <i32 0, i32 1, i32 2, i32 2>
+; GCN-NEXT: [[PRINTARGVECT:%.*]] = bitcast <4 x float> [[TMP3]] to <2 x i64>
+; GCN-NEXT: [[PRINTBUFFPTRCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFGEP]] to ptr addrspace(1)
+; GCN-NEXT: store <2 x i64> [[PRINTARGVECT]], ptr addrspace(1) [[PRINTBUFFPTRCAST]], align 16
+; GCN-NEXT: [[PRINTBUFFNEXTPTR:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFGEP]], i32 16
+; GCN-NEXT: [[TMP4:%.*]] = shufflevector <3 x double> [[V3F32_1_FPEXT]], <3 x double> [[V3F32_1_FPEXT]], <4 x i32> <i32 0, i32 1, i32 2, i32 2>
+; GCN-NEXT: [[PRINTARGVECT1:%.*]] = bitcast <4 x double> [[TMP4]] to <4 x i64>
+; GCN-NEXT: [[PRINTBUFFPTRCAST2:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR]] to ptr addrspace(1)
+; GCN-NEXT: store <4 x i64> [[PRINTARGVECT1]], ptr addrspace(1) [[PRINTBUFFPTRCAST2]], align 32
+; GCN-NEXT: [[PRINTBUFFNEXTPTR3:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR]], i32 32
+; GCN-NEXT: [[TMP5:%.*]] = shufflevector <3 x double> [[V3F64:%.*]], <3 x double> [[V3F64]], <4 x i32> <i32 0, i32 1, i32 2, i32 2>
+; GCN-NEXT: [[PRINTARGVECT4:%.*]] = bitcast <4 x double> [[TMP5]] to <4 x i64>
+; GCN-NEXT: [[PRINTBUFFPTRCAST5:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR3]] to ptr addrspace(1)
+; GCN-NEXT: store <4 x i64> [[PRINTARGVECT4]], ptr addrspace(1) [[PRINTBUFFPTRCAST5]], align 32
+; GCN-NEXT: [[PRINTBUFFNEXTPTR6:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR3]], i32 32
+; GCN-NEXT: [[TMP6:%.*]] = shufflevector <3 x i8> [[V3I8:%.*]], <3 x i8> [[V3I8]], <4 x i32> <i32 0, i32 1, i32 2, i32 2>
+; GCN-NEXT: [[PRINTARGVECT7:%.*]] = bitcast <4 x i8> [[TMP6]] to i32
+; GCN-NEXT: [[PRINTBUFFPTRCAST8:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR6]] to ptr addrspace(1)
+; GCN-NEXT: store i32 [[PRINTARGVECT7]], ptr addrspace(1) [[PRINTBUFFPTRCAST8]], align 4
+; GCN-NEXT: [[PRINTBUFFNEXTPTR9:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR6]], i32 4
+; GCN-NEXT: [[TMP7:%.*]] = shufflevector <3 x i16> [[V3I16:%.*]], <3 x i16> [[V3I16]], <4 x i32> <i32 0, i32 1, i32 2, i32 2>
+; GCN-NEXT: [[PRINTARGVECT10:%.*]] = bitcast <4 x i16> [[TMP7]] to i64
+; GCN-NEXT: [[PRINTBUFFPTRCAST11:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR9]] to ptr addrspace(1)
+; GCN-NEXT: store i64 [[PRINTARGVECT10]], ptr addrspace(1) [[PRINTBUFFPTRCAST11]], align 4
+; GCN-NEXT: [[PRINTBUFFNEXTPTR12:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR9]], i32 8
+; GCN-NEXT: [[TMP8:%.*]] = shufflevector <3 x i32> [[V3I32:%.*]], <3 x i32> [[V3I32]], <4 x i32> <i32 0, i32 1, i32 2, i32 2>
+; GCN-NEXT: [[PRINTARGVECT13:%.*]] = bitcast <4 x i32> [[TMP8]] to <2 x i64>
+; GCN-NEXT: [[PRINTBUFFPTRCAST14:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR12]] to ptr addrspace(1)
+; GCN-NEXT: store <2 x i64> [[PRINTARGVECT13]], ptr addrspace(1) [[PRINTBUFFPTRCAST14]], align 16
+; GCN-NEXT: [[PRINTBUFFNEXTPTR15:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR12]], i32 16
+; GCN-NEXT: [[TMP9:%.*]] = shufflevector <3 x i64> [[V3I64:%.*]], <3 x i64> [[V3I64]], <4 x i32> <i32 0, i32 1, i32 2, i32 2>
+; GCN-NEXT: [[PRINTARGVECT16:%.*]] = bitcast <4 x i64> [[TMP9]] to <4 x i64>
+; GCN-NEXT: [[PRINTBUFFPTRCAST17:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR15]] to ptr addrspace(1)
+; GCN-NEXT: store <4 x i64> [[PRINTARGVECT16]], ptr addrspace(1) [[PRINTBUFFPTRCAST17]], align 32
+; GCN-NEXT: [[PRINTBUFFNEXTPTR18:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR15]], i32 32
+; GCN-NEXT: br label [[TMP10]]
+; GCN: 10:
+; GCN-NEXT: ret void
+;
+ <3 x ptr addrspace(1)> %v3p1, <3 x ptr addrspace(3)> %v3p3, <3 x half> %v3f16) {
+ %v3f32.1.fpext = fpext <3 x float> %v3f32.1 to <3 x double>
+ %call1 = call i32 @printf(ptr addrspace(4) @format.str.v3, <3 x float> %v3f32.0, <3 x double> %v3f32.1.fpext, <3 x double> %v3f64, <3 x i8> %v3i8, <3 x i16> %v3i16, <3 x i32> %v3i32, <3 x i64> %v3i64,
+ <3 x ptr addrspace(1)> %v3p1, <3 x ptr addrspace(3)> %v3p3, <3 x half> %v3f16)
+ ret void
+}
+
+define void @format_str_v4(<4 x float> %v4f32.0, <4 x float> %v4f32.1, <4 x double> %v4f64, <4 x i8> %v4i8, <4 x i16> %v4i16, <4 x i32> %v4i32, <4 x i64> %v4i64,
+; R600-LABEL: @format_str_v4(
+; R600-NEXT: [[V4F32_1_FPEXT:%.*]] = fpext <4 x float> [[V4F32_1:%.*]] to <4 x double>
+; R600-NEXT: [[CALL1:%.*]] = call i32 @printf(ptr addrspace(4) @format.str.v4, <4 x float> [[V4F32_0:%.*]], <4 x double> [[V4F32_1_FPEXT]], <4 x double> [[V4F64:%.*]], <4 x i8> [[V4I8:%.*]], <4 x i16> [[V4I16:%.*]], <4 x i32> [[V4I32:%.*]], <4 x i64> [[V4I64:%.*]], <4 x ptr addrspace(1)> [[V4P1:%.*]], <4 x ptr addrspace(3)> [[V4P3:%.*]], <4 x half> [[V4F16:%.*]])
+; R600-NEXT: ret void
+;
+; GCN-LABEL: @format_str_v4(
+; GCN-NEXT: [[V4F32_1_FPEXT:%.*]] = fpext <4 x float> [[V4F32_1:%.*]] to <4 x double>
+; GCN-NEXT: [[PRINTF_ALLOC_FN:%.*]] = call ptr addrspace(1) @__printf_alloc(i32 144)
+; GCN-NEXT: br label [[DOTSPLIT:%.*]]
+; GCN: .split:
+; GCN-NEXT: [[TMP1:%.*]] = icmp ne ptr addrspace(1) [[PRINTF_ALLOC_FN]], null
+; GCN-NEXT: br i1 [[TMP1]], label [[TMP2:%.*]], label [[TMP3:%.*]]
+; GCN: 2:
+; GCN-NEXT: [[PRINTBUFFID:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 0
+; GCN-NEXT: [[PRINTBUFFIDCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFID]] to ptr addrspace(1)
+; GCN-NEXT: store i32 7, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
+; GCN-NEXT: [[PRINTBUFFGEP:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 4
+; GCN-NEXT: [[PRINTARGVECT:%.*]] = bitcast <4 x float> [[V4F32_0:%.*]] to <2 x i64>
+; GCN-NEXT: [[PRINTBUFFPTRCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFGEP]] to ptr addrspace(1)
+; GCN-NEXT: store <2 x i64> [[PRINTARGVECT]], ptr addrspace(1) [[PRINTBUFFPTRCAST]], align 16
+; GCN-NEXT: [[PRINTBUFFNEXTPTR:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFGEP]], i32 16
+; GCN-NEXT: [[PRINTARGVECT1:%.*]] = bitcast <4 x double> [[V4F32_1_FPEXT]] to <4 x i64>
+; GCN-NEXT: [[PRINTBUFFPTRCAST2:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR]] to ptr addrspace(1)
+; GCN-NEXT: store <4 x i64> [[PRINTARGVECT1]], ptr addrspace(1) [[PRINTBUFFPTRCAST2]], align 32
+; GCN-NEXT: [[PRINTBUFFNEXTPTR3:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR]], i32 32
+; GCN-NEXT: [[PRINTARGVECT4:%.*]] = bitcast <4 x double> [[V4F64:%.*]] to <4 x i64>
+; GCN-NEXT: [[PRINTBUFFPTRCAST5:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR3]] to ptr addrspace(1)
+; GCN-NEXT: store <4 x i64> [[PRINTARGVECT4]], ptr addrspace(1) [[PRINTBUFFPTRCAST5]], align 32
+; GCN-NEXT: [[PRINTBUFFNEXTPTR6:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR3]], i32 32
+; GCN-NEXT: [[PRINTARGVECT7:%.*]] = bitcast <4 x i8> [[V4I8:%.*]] to i32
+; GCN-NEXT: [[PRINTBUFFPTRCAST8:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR6]] to ptr addrspace(1)
+; GCN-NEXT: store i32 [[PRINTARGVECT7]], ptr addrspace(1) [[PRINTBUFFPTRCAST8]], align 4
+; GCN-NEXT: [[PRINTBUFFNEXTPTR9:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR6]], i32 4
+; GCN-NEXT: [[PRINTARGVECT10:%.*]] = bitcast <4 x i16> [[V4I16:%.*]] to i64
+; GCN-NEXT: [[PRINTBUFFPTRCAST11:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR9]] to ptr addrspace(1)
+; GCN-NEXT: store i64 [[PRINTARGVECT10]], ptr addrspace(1) [[PRINTBUFFPTRCAST11]], align 4
+; GCN-NEXT: [[PRINTBUFFNEXTPTR12:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR9]], i32 8
+; GCN-NEXT: [[PRINTARGVECT13:%.*]] = bitcast <4 x i32> [[V4I32:%.*]] to <2 x i64>
+; GCN-NEXT: [[PRINTBUFFPTRCAST14:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR12]] to ptr addrspace(1)
+; GCN-NEXT: store <2 x i64> [[PRINTARGVECT13]], ptr addrspace(1) [[PRINTBUFFPTRCAST14]], align 16
+; GCN-NEXT: [[PRINTBUFFNEXTPTR15:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR12]], i32 16
+; GCN-NEXT: [[PRINTARGVECT16:%.*]] = bitcast <4 x i64> [[V4I64:%.*]] to <4 x i64>
+; GCN-NEXT: [[PRINTBUFFPTRCAST17:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR15]] to ptr addrspace(1)
+; GCN-NEXT: store <4 x i64> [[PRINTARGVECT16]], ptr addrspace(1) [[PRINTBUFFPTRCAST17]], align 32
+; GCN-NEXT: [[PRINTBUFFNEXTPTR18:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR15]], i32 32
+; GCN-NEXT: br label [[TMP3]]
+; GCN: 3:
+; GCN-NEXT: ret void
+;
+ <4 x ptr addrspace(1)> %v4p1, <4 x ptr addrspace(3)> %v4p3, <4 x half> %v4f16) {
+ %v4f32.1.fpext = fpext <4 x float> %v4f32.1 to <4 x double>
+ %call1 = call i32 @printf(ptr addrspace(4) @format.str.v4, <4 x float> %v4f32.0, <4 x double> %v4f32.1.fpext, <4 x double> %v4f64, <4 x i8> %v4i8, <4 x i16> %v4i16, <4 x i32> %v4i32, <4 x i64> %v4i64,
+ <4 x ptr addrspace(1)> %v4p1, <4 x ptr addrspace(3)> %v4p3, <4 x half> %v4f16)
+ ret void
+}
+
+define void @format_str_v8(<8 x float> %v8f32.0, <8 x float> %v8f32.1, <8 x double> %v8f64, <8 x i8> %v8i8, <8 x i16> %v8i16, <8 x i32> %v8i32, <8 x i64> %v8i64,
+; R600-LABEL: @format_str_v8(
+; R600-NEXT: [[V8F32_1_FPEXT:%.*]] = fpext <8 x float> [[V8F32_1:%.*]] to <8 x double>
+; R600-NEXT: [[CALL1:%.*]] = call i32 @printf(ptr addrspace(4) @format.str.v8, <8 x float> [[V8F32_0:%.*]], <8 x double> [[V8F32_1_FPEXT]], <8 x double> [[V8F64:%.*]], <8 x i8> [[V8I8:%.*]], <8 x i16> [[V8I16:%.*]], <8 x i32> [[V8I32:%.*]], <8 x i64> [[V8I64:%.*]], <8 x ptr addrspace(1)> [[V8P1:%.*]], <8 x ptr addrspace(3)> [[V8P3:%.*]], <8 x half> [[V8F16:%.*]])
+; R600-NEXT: ret void
+;
+; GCN-LABEL: @format_str_v8(
+; GCN-NEXT: [[V8F32_1_FPEXT:%.*]] = fpext <8 x float> [[V8F32_1:%.*]] to <8 x double>
+; GCN-NEXT: [[PRINTF_ALLOC_FN:%.*]] = call ptr addrspace(1) @__printf_alloc(i32 284)
+; GCN-NEXT: br label [[DOTSPLIT:%.*]]
+; GCN: .split:
+; GCN-NEXT: [[TMP1:%.*]] = icmp ne ptr addrspace(1) [[PRINTF_ALLOC_FN]], null
+; GCN-NEXT: br i1 [[TMP1]], label [[TMP2:%.*]], label [[TMP3:%.*]]
+; GCN: 2:
+; GCN-NEXT: [[PRINTBUFFID:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 0
+; GCN-NEXT: [[PRINTBUFFIDCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFID]] to ptr addrspace(1)
+; GCN-NEXT: store i32 8, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
+; GCN-NEXT: [[PRINTBUFFGEP:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 4
+; GCN-NEXT: [[PRINTARGVECT:%.*]] = bitcast <8 x float> [[V8F32_0:%.*]] to <4 x i64>
+; GCN-NEXT: [[PRINTBUFFPTRCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFGEP]] to ptr addrspace(1)
+; GCN-NEXT: store <4 x i64> [[PRINTARGVECT]], ptr addrspace(1) [[PRINTBUFFPTRCAST]], align 32
+; GCN-NEXT: [[PRINTBUFFNEXTPTR:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFGEP]], i32 32
+; GCN-NEXT: [[PRINTARGVECT1:%.*]] = bitcast <8 x double> [[V8F32_1_FPEXT]] to <8 x i64>
+; GCN-NEXT: [[PRINTBUFFPTRCAST2:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR]] to ptr addrspace(1)
+; GCN-NEXT: store <8 x i64> [[PRINTARGVECT1]], ptr addrspace(1) [[PRINTBUFFPTRCAST2]], align 64
+; GCN-NEXT: [[PRINTBUFFNEXTPTR3:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR]], i32 64
+; GCN-NEXT: [[PRINTARGVECT4:%.*]] = bitcast <8 x double> [[V8F64:%.*]] to <8 x i64>
+; GCN-NEXT: [[PRINTBUFFPTRCAST5:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR3]] to ptr addrspace(1)
+; GCN-NEXT: store <8 x i64> [[PRINTARGVECT4]], ptr addrspace(1) [[PRINTBUFFPTRCAST5]], align 64
+; GCN-NEXT: [[PRINTBUFFNEXTPTR6:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR3]], i32 64
+; GCN-NEXT: [[PRINTARGVECT7:%.*]] = bitcast <8 x i8> [[V8I8:%.*]] to i64
+; GCN-NEXT: [[PRINTBUFFPTRCAST8:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR6]] to ptr addrspace(1)
+; GCN-NEXT: store i64 [[PRINTARGVECT7]], ptr addrspace(1) [[PRINTBUFFPTRCAST8]], align 4
+; GCN-NEXT: [[PRINTBUFFNEXTPTR9:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR6]], i32 8
+; GCN-NEXT: [[PRINTARGVECT10:%.*]] = bitcast <8 x i16> [[V8I16:%.*]] to <2 x i64>
+; GCN-NEXT: [[PRINTBUFFPTRCAST11:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR9]] to ptr addrspace(1)
+; GCN-NEXT: store <2 x i64> [[PRINTARGVECT10]], ptr addrspace(1) [[PRINTBUFFPTRCAST11]], align 16
+; GCN-NEXT: [[PRINTBUFFNEXTPTR12:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR9]], i32 16
+; GCN-NEXT: [[PRINTARGVECT13:%.*]] = bitcast <8 x i32> [[V8I32:%.*]] to <4 x i64>
+; GCN-NEXT: [[PRINTBUFFPTRCAST14:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR12]] to ptr addrspace(1)
+; GCN-NEXT: store <4 x i64> [[PRINTARGVECT13]], ptr addrspace(1) [[PRINTBUFFPTRCAST14]], align 32
+; GCN-NEXT: [[PRINTBUFFNEXTPTR15:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR12]], i32 32
+; GCN-NEXT: [[PRINTARGVECT16:%.*]] = bitcast <8 x i64> [[V8I64:%.*]] to <8 x i64>
+; GCN-NEXT: [[PRINTBUFFPTRCAST17:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR15]] to ptr addrspace(1)
+; GCN-NEXT: store <8 x i64> [[PRINTARGVECT16]], ptr addrspace(1) [[PRINTBUFFPTRCAST17]], align 64
+; GCN-NEXT: [[PRINTBUFFNEXTPTR18:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR15]], i32 64
+; GCN-NEXT: br label [[TMP3]]
+; GCN: 3:
+; GCN-NEXT: ret void
+;
+ <8 x ptr addrspace(1)> %v8p1, <8 x ptr addrspace(3)> %v8p3, <8 x half> %v8f16) {
+ %v8f32.1.fpext = fpext <8 x float> %v8f32.1 to <8 x double>
+ %call1 = call i32 @printf(ptr addrspace(4) @format.str.v8, <8 x float> %v8f32.0, <8 x double> %v8f32.1.fpext, <8 x double> %v8f64, <8 x i8> %v8i8, <8 x i16> %v8i16, <8 x i32> %v8i32, <8 x i64> %v8i64,
+ <8 x ptr addrspace(1)> %v8p1, <8 x ptr addrspace(3)> %v8p3, <8 x half> %v8f16)
+ ret void
+}
+
+define void @format_str_v16(<16 x float> %v16f32.0, <16 x float> %v16f32.1, <16 x double> %v16f64, <16 x i8> %v16i8, <16 x i16> %v16i16, <16 x i32> %v16i32, <16 x i64> %v16i64,
+; R600-LABEL: @format_str_v16(
+; R600-NEXT: [[V16F32_1_FPEXT:%.*]] = fpext <16 x float> [[V16F32_1:%.*]] to <16 x double>
+; R600-NEXT: [[CALL1:%.*]] = call i32 @printf(ptr addrspace(4) @format.str.v16, <16 x float> [[V16F32_0:%.*]], <16 x double> [[V16F32_1_FPEXT]], <16 x double> [[V16F64:%.*]], <16 x i8> [[V16I8:%.*]], <16 x i16> [[V16I16:%.*]], <16 x i32> [[V16I32:%.*]], <16 x i64> [[V16I64:%.*]], <16 x ptr addrspace(1)> [[V16P1:%.*]], <16 x ptr addrspace(3)> [[V16P3:%.*]], <16 x half> [[V16F16:%.*]])
+; R600-NEXT: ret void
+;
+; GCN-LABEL: @format_str_v16(
+; GCN-NEXT: [[V16F32_1_FPEXT:%.*]] = fpext <16 x float> [[V16F32_1:%.*]] to <16 x double>
+; GCN-NEXT: [[PRINTF_ALLOC_FN:%.*]] = call ptr addrspace(1) @__printf_alloc(i32 564)
+; GCN-NEXT: br label [[DOTSPLIT:%.*]]
+; GCN: .split:
+; GCN-NEXT: [[TMP1:%.*]] = icmp ne ptr addrspace(1) [[PRINTF_ALLOC_FN]], null
+; GCN-NEXT: br i1 [[TMP1]], label [[TMP2:%.*]], label [[TMP3:%.*]]
+; GCN: 2:
+; GCN-NEXT: [[PRINTBUFFID:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 0
+; GCN-NEXT: [[PRINTBUFFIDCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFID]] to ptr addrspace(1)
+; GCN-NEXT: store i32 9, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
+; GCN-NEXT: [[PRINTBUFFGEP:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 4
+; GCN-NEXT: [[PRINTARGVECT:%.*]] = bitcast <16 x float> [[V16F32_0:%.*]] to <8 x i64>
+; GCN-NEXT: [[PRINTBUFFPTRCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFGEP]] to ptr addrspace(1)
+; GCN-NEXT: store <8 x i64> [[PRINTARGVECT]], ptr addrspace(1) [[PRINTBUFFPTRCAST]], align 64
+; GCN-NEXT: [[PRINTBUFFNEXTPTR:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFGEP]], i32 64
+; GCN-NEXT: [[PRINTARGVECT1:%.*]] = bitcast <16 x double> [[V16F32_1_FPEXT]] to <16 x i64>
+; GCN-NEXT: [[PRINTBUFFPTRCAST2:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR]] to ptr addrspace(1)
+; GCN-NEXT: store <16 x i64> [[PRINTARGVECT1]], ptr addrspace(1) [[PRINTBUFFPTRCAST2]], align 128
+; GCN-NEXT: [[PRINTBUFFNEXTPTR3:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR]], i32 128
+; GCN-NEXT: [[PRINTARGVECT4:%.*]] = bitcast <16 x double> [[V16F64:%.*]] to <16 x i64>
+; GCN-NEXT: [[PRINTBUFFPTRCAST5:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR3]] to ptr addrspace(1)
+; GCN-NEXT: store <16 x i64> [[PRINTARGVECT4]], ptr addrspace(1) [[PRINTBUFFPTRCAST5]], align 128
+; GCN-NEXT: [[PRINTBUFFNEXTPTR6:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR3]], i32 128
+; GCN-NEXT: [[PRINTARGVECT7:%.*]] = bitcast <16 x i8> [[V16I8:%.*]] to <2 x i64>
+; GCN-NEXT: [[PRINTBUFFPTRCAST8:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR6]] to ptr addrspace(1)
+; GCN-NEXT: store <2 x i64> [[PRINTARGVECT7]], ptr addrspace(1) [[PRINTBUFFPTRCAST8]], align 16
+; GCN-NEXT: [[PRINTBUFFNEXTPTR9:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR6]], i32 16
+; GCN-NEXT: [[PRINTARGVECT10:%.*]] = bitcast <16 x i16> [[V16I16:%.*]] to <4 x i64>
+; GCN-NEXT: [[PRINTBUFFPTRCAST11:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR9]] to ptr addrspace(1)
+; GCN-NEXT: store <4 x i64> [[PRINTARGVECT10]], ptr addrspace(1) [[PRINTBUFFPTRCAST11]], align 32
+; GCN-NEXT: [[PRINTBUFFNEXTPTR12:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR9]], i32 32
+; GCN-NEXT: [[PRINTARGVECT13:%.*]] = bitcast <16 x i32> [[V16I32:%.*]] to <8 x i64>
+; GCN-NEXT: [[PRINTBUFFPTRCAST14:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR12]] to ptr addrspace(1)
+; GCN-NEXT: store <8 x i64> [[PRINTARGVECT13]], ptr addrspace(1) [[PRINTBUFFPTRCAST14]], align 64
+; GCN-NEXT: [[PRINTBUFFNEXTPTR15:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR12]], i32 64
+; GCN-NEXT: [[PRINTARGVECT16:%.*]] = bitcast <16 x i64> [[V16I64:%.*]] to <16 x i64>
+; GCN-NEXT: [[PRINTBUFFPTRCAST17:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFNEXTPTR15]] to ptr addrspace(1)
+; GCN-NEXT: store <16 x i64> [[PRINTARGVECT16]], ptr addrspace(1) [[PRINTBUFFPTRCAST17]], align 128
+; GCN-NEXT: [[PRINTBUFFNEXTPTR18:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTBUFFNEXTPTR15]], i32 128
+; GCN-NEXT: br label [[TMP3]]
+; GCN: 3:
+; GCN-NEXT: ret void
+;
+ <16 x ptr addrspace(1)> %v16p1, <16 x ptr addrspace(3)> %v16p3, <16 x half> %v16f16) {
+ %v16f32.1.fpext = fpext <16 x float> %v16f32.1 to <16 x double>
+ %call1 = call i32 @printf(ptr addrspace(4) @format.str.v16, <16 x float> %v16f32.0, <16 x double> %v16f32.1.fpext, <16 x double> %v16f64, <16 x i8> %v16i8, <16 x i16> %v16i16, <16 x i32> %v16i32, <16 x i64> %v16i64,
+ <16 x ptr addrspace(1)> %v16p1, <16 x ptr addrspace(3)> %v16p3, <16 x half> %v16f16)
+ ret void
+}
define amdgpu_kernel void @test_kernel(i32 %n) {
; R600-LABEL: @test_kernel(
@@ -52,7 +587,7 @@ define amdgpu_kernel void @test_kernel(i32 %n) {
; GCN: 1:
; GCN-NEXT: [[PRINTBUFFID:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 0
; GCN-NEXT: [[PRINTBUFFIDCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFID]] to ptr addrspace(1)
-; GCN-NEXT: store i32 1, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
+; GCN-NEXT: store i32 10, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
; GCN-NEXT: [[PRINTBUFFGEP:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 4
; GCN-NEXT: [[PRINTBUFFPTRCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFGEP]] to ptr addrspace(1)
; GCN-NEXT: store i32 4144959, ptr addrspace(1) [[PRINTBUFFPTRCAST]], align 4
@@ -85,7 +620,7 @@ define amdgpu_kernel void @string_pointee_type(i32 %n) {
; GCN: 2:
; GCN-NEXT: [[PRINTBUFFID:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 0
; GCN-NEXT: [[PRINTBUFFIDCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFID]] to ptr addrspace(1)
-; GCN-NEXT: store i32 2, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
+; GCN-NEXT: store i32 11, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
; GCN-NEXT: [[PRINTBUFFGEP:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 4
; GCN-NEXT: [[PRINTBUFFPTRCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFGEP]] to ptr addrspace(1)
; GCN-NEXT: store i32 4144959, ptr addrspace(1) [[PRINTBUFFPTRCAST]], align 4
@@ -115,7 +650,7 @@ define amdgpu_kernel void @string_address_space4(i32 %n, ptr addrspace(4) %str)
; GCN: 2:
; GCN-NEXT: [[PRINTBUFFID:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 0
; GCN-NEXT: [[PRINTBUFFIDCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFID]] to ptr addrspace(1)
-; GCN-NEXT: store i32 3, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
+; GCN-NEXT: store i32 12, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
; GCN-NEXT: [[PRINTBUFFGEP:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 4
; GCN-NEXT: [[PRINTBUFFPTRCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFGEP]] to ptr addrspace(1)
; GCN-NEXT: store i32 4144959, ptr addrspace(1) [[PRINTBUFFPTRCAST]], align 4
@@ -144,7 +679,7 @@ define amdgpu_kernel void @string_address_space1(i32 %n, ptr addrspace(1) %str)
; GCN: 2:
; GCN-NEXT: [[PRINTBUFFID:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 0
; GCN-NEXT: [[PRINTBUFFIDCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFID]] to ptr addrspace(1)
-; GCN-NEXT: store i32 4, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
+; GCN-NEXT: store i32 13, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
; GCN-NEXT: [[PRINTBUFFGEP:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 4
; GCN-NEXT: [[PRINTBUFFPTRCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFGEP]] to ptr addrspace(1)
; GCN-NEXT: store i32 4144959, ptr addrspace(1) [[PRINTBUFFPTRCAST]], align 4
@@ -173,7 +708,7 @@ define amdgpu_kernel void @string_format_passed_i32(i32 %n, i32 %str) {
; GCN: 2:
; GCN-NEXT: [[PRINTBUFFID:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 0
; GCN-NEXT: [[PRINTBUFFIDCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFID]] to ptr addrspace(1)
-; GCN-NEXT: store i32 5, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
+; GCN-NEXT: store i32 14, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
; GCN-NEXT: [[PRINTBUFFGEP:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 4
; GCN-NEXT: [[PRINTBUFFPTRCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFGEP]] to ptr addrspace(1)
; GCN-NEXT: store i32 [[STR:%.*]], ptr addrspace(1) [[PRINTBUFFPTRCAST]], align 4
@@ -211,7 +746,7 @@ define amdgpu_kernel void @test_kernel_addrspacecasted_format_str(i32 %n) {
; GCN: 1:
; GCN-NEXT: [[PRINTBUFFID:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 0
; GCN-NEXT: [[PRINTBUFFIDCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFID]] to ptr addrspace(1)
-; GCN-NEXT: store i32 6, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
+; GCN-NEXT: store i32 15, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
; GCN-NEXT: [[PRINTBUFFGEP:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 4
; GCN-NEXT: [[PRINTBUFFPTRCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFGEP]] to ptr addrspace(1)
; GCN-NEXT: store i32 4144959, ptr addrspace(1) [[PRINTBUFFPTRCAST]], align 4
@@ -341,7 +876,7 @@ define amdgpu_kernel void @test_print_string_literal_size0(i32 %n) {
; GCN: 1:
; GCN-NEXT: [[PRINTBUFFID:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 0
; GCN-NEXT: [[PRINTBUFFIDCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFID]] to ptr addrspace(1)
-; GCN-NEXT: store i32 7, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
+; GCN-NEXT: store i32 16, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
; GCN-NEXT: [[PRINTBUFFGEP:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 4
; GCN-NEXT: [[PRINTBUFFPTRCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFGEP]] to ptr addrspace(1)
; GCN-NEXT: store i32 4144959, ptr addrspace(1) [[PRINTBUFFPTRCAST]], align 4
@@ -373,7 +908,7 @@ define amdgpu_kernel void @test_print_string_literal_1ai8.zero(i32 %n) {
; GCN: 1:
; GCN-NEXT: [[PRINTBUFFID:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 0
; GCN-NEXT: [[PRINTBUFFIDCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFID]] to ptr addrspace(1)
-; GCN-NEXT: store i32 8, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
+; GCN-NEXT: store i32 17, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
; GCN-NEXT: [[PRINTBUFFGEP:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 4
; GCN-NEXT: [[PRINTBUFFPTRCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFGEP]] to ptr addrspace(1)
; GCN-NEXT: store i32 4144959, ptr addrspace(1) [[PRINTBUFFPTRCAST]], align 4
@@ -405,7 +940,7 @@ define amdgpu_kernel void @test_print_string_literal_1ai8.undef(i32 %n) {
; GCN: 1:
; GCN-NEXT: [[PRINTBUFFID:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 0
; GCN-NEXT: [[PRINTBUFFIDCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFID]] to ptr addrspace(1)
-; GCN-NEXT: store i32 9, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
+; GCN-NEXT: store i32 18, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
; GCN-NEXT: [[PRINTBUFFGEP:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 4
; GCN-NEXT: [[PRINTBUFFPTRCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFGEP]] to ptr addrspace(1)
; GCN-NEXT: store i32 4144959, ptr addrspace(1) [[PRINTBUFFPTRCAST]], align 4
@@ -437,7 +972,7 @@ define amdgpu_kernel void @test_print_string_literal_i8.zero(i32 %n) {
; GCN: 1:
; GCN-NEXT: [[PRINTBUFFID:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 0
; GCN-NEXT: [[PRINTBUFFIDCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFID]] to ptr addrspace(1)
-; GCN-NEXT: store i32 10, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
+; GCN-NEXT: store i32 19, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
; GCN-NEXT: [[PRINTBUFFGEP:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 4
; GCN-NEXT: [[PRINTBUFFPTRCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFGEP]] to ptr addrspace(1)
; GCN-NEXT: store i32 4144959, ptr addrspace(1) [[PRINTBUFFPTRCAST]], align 4
@@ -469,7 +1004,7 @@ define amdgpu_kernel void @test_print_string_literal_size2(i32 %n) {
; GCN: 1:
; GCN-NEXT: [[PRINTBUFFID:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 0
; GCN-NEXT: [[PRINTBUFFIDCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFID]] to ptr addrspace(1)
-; GCN-NEXT: store i32 11, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
+; GCN-NEXT: store i32 20, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
; GCN-NEXT: [[PRINTBUFFGEP:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 4
; GCN-NEXT: [[PRINTBUFFPTRCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFGEP]] to ptr addrspace(1)
; GCN-NEXT: store i32 4144959, ptr addrspace(1) [[PRINTBUFFPTRCAST]], align 4
@@ -501,7 +1036,7 @@ define amdgpu_kernel void @test_print_string_literal_size3(i32 %n) {
; GCN: 1:
; GCN-NEXT: [[PRINTBUFFID:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 0
; GCN-NEXT: [[PRINTBUFFIDCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFID]] to ptr addrspace(1)
-; GCN-NEXT: store i32 12, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
+; GCN-NEXT: store i32 21, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
; GCN-NEXT: [[PRINTBUFFGEP:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 4
; GCN-NEXT: [[PRINTBUFFPTRCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFGEP]] to ptr addrspace(1)
; GCN-NEXT: store i32 4144959, ptr addrspace(1) [[PRINTBUFFPTRCAST]], align 4
@@ -533,7 +1068,7 @@ define amdgpu_kernel void @test_print_string_literal_size3_zero(i32 %n) {
; GCN: 1:
; GCN-NEXT: [[PRINTBUFFID:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 0
; GCN-NEXT: [[PRINTBUFFIDCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFID]] to ptr addrspace(1)
-; GCN-NEXT: store i32 13, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
+; GCN-NEXT: store i32 22, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
; GCN-NEXT: [[PRINTBUFFGEP:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 4
; GCN-NEXT: [[PRINTBUFFPTRCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFGEP]] to ptr addrspace(1)
; GCN-NEXT: store i32 4144959, ptr addrspace(1) [[PRINTBUFFPTRCAST]], align 4
@@ -565,7 +1100,7 @@ define amdgpu_kernel void @test_print_string_literal_size4(i32 %n) {
; GCN: 1:
; GCN-NEXT: [[PRINTBUFFID:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 0
; GCN-NEXT: [[PRINTBUFFIDCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFID]] to ptr addrspace(1)
-; GCN-NEXT: store i32 14, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
+; GCN-NEXT: store i32 23, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
; GCN-NEXT: [[PRINTBUFFGEP:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 4
; GCN-NEXT: [[PRINTBUFFPTRCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFGEP]] to ptr addrspace(1)
; GCN-NEXT: store i32 4144959, ptr addrspace(1) [[PRINTBUFFPTRCAST]], align 4
@@ -597,7 +1132,7 @@ define amdgpu_kernel void @test_print_string_literal_size4_nonull_term(i32 %n) {
; GCN: 1:
; GCN-NEXT: [[PRINTBUFFID:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 0
; GCN-NEXT: [[PRINTBUFFIDCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFID]] to ptr addrspace(1)
-; GCN-NEXT: store i32 15, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
+; GCN-NEXT: store i32 24, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
; GCN-NEXT: [[PRINTBUFFGEP:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 4
; GCN-NEXT: [[PRINTBUFFPTRCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFGEP]] to ptr addrspace(1)
; GCN-NEXT: store i32 4144959, ptr addrspace(1) [[PRINTBUFFPTRCAST]], align 4
@@ -629,7 +1164,7 @@ define amdgpu_kernel void @test_print_string_literal_size5(i32 %n) {
; GCN: 1:
; GCN-NEXT: [[PRINTBUFFID:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 0
; GCN-NEXT: [[PRINTBUFFIDCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFID]] to ptr addrspace(1)
-; GCN-NEXT: store i32 16, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
+; GCN-NEXT: store i32 25, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
; GCN-NEXT: [[PRINTBUFFGEP:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 4
; GCN-NEXT: [[PRINTBUFFPTRCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFGEP]] to ptr addrspace(1)
; GCN-NEXT: store i32 4144959, ptr addrspace(1) [[PRINTBUFFPTRCAST]], align 4
@@ -661,7 +1196,7 @@ define amdgpu_kernel void @test_print_string_literal_size6(i32 %n) {
; GCN: 1:
; GCN-NEXT: [[PRINTBUFFID:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 0
; GCN-NEXT: [[PRINTBUFFIDCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFID]] to ptr addrspace(1)
-; GCN-NEXT: store i32 17, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
+; GCN-NEXT: store i32 26, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
; GCN-NEXT: [[PRINTBUFFGEP:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 4
; GCN-NEXT: [[PRINTBUFFPTRCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFGEP]] to ptr addrspace(1)
; GCN-NEXT: store i32 4144959, ptr addrspace(1) [[PRINTBUFFPTRCAST]], align 4
@@ -693,7 +1228,7 @@ define amdgpu_kernel void @test_print_string_literal_size7(i32 %n) {
; GCN: 1:
; GCN-NEXT: [[PRINTBUFFID:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 0
; GCN-NEXT: [[PRINTBUFFIDCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFID]] to ptr addrspace(1)
-; GCN-NEXT: store i32 18, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
+; GCN-NEXT: store i32 27, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
; GCN-NEXT: [[PRINTBUFFGEP:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 4
; GCN-NEXT: [[PRINTBUFFPTRCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFGEP]] to ptr addrspace(1)
; GCN-NEXT: store i32 4144959, ptr addrspace(1) [[PRINTBUFFPTRCAST]], align 4
@@ -725,7 +1260,7 @@ define amdgpu_kernel void @test_print_string_literal_size8(i32 %n) {
; GCN: 1:
; GCN-NEXT: [[PRINTBUFFID:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 0
; GCN-NEXT: [[PRINTBUFFIDCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFID]] to ptr addrspace(1)
-; GCN-NEXT: store i32 19, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
+; GCN-NEXT: store i32 28, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
; GCN-NEXT: [[PRINTBUFFGEP:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 4
; GCN-NEXT: [[PRINTBUFFPTRCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFGEP]] to ptr addrspace(1)
; GCN-NEXT: store i32 4144959, ptr addrspace(1) [[PRINTBUFFPTRCAST]], align 4
@@ -757,7 +1292,7 @@ define amdgpu_kernel void @test_print_string_literal_size9(i32 %n) {
; GCN: 1:
; GCN-NEXT: [[PRINTBUFFID:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 0
; GCN-NEXT: [[PRINTBUFFIDCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFID]] to ptr addrspace(1)
-; GCN-NEXT: store i32 20, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
+; GCN-NEXT: store i32 29, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
; GCN-NEXT: [[PRINTBUFFGEP:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 4
; GCN-NEXT: [[PRINTBUFFPTRCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFGEP]] to ptr addrspace(1)
; GCN-NEXT: store i32 4144959, ptr addrspace(1) [[PRINTBUFFPTRCAST]], align 4
@@ -789,7 +1324,7 @@ define amdgpu_kernel void @test_print_string_literal_size16(i32 %n) {
; GCN: 1:
; GCN-NEXT: [[PRINTBUFFID:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 0
; GCN-NEXT: [[PRINTBUFFIDCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFID]] to ptr addrspace(1)
-; GCN-NEXT: store i32 21, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
+; GCN-NEXT: store i32 30, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
; GCN-NEXT: [[PRINTBUFFGEP:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 4
; GCN-NEXT: [[PRINTBUFFPTRCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFGEP]] to ptr addrspace(1)
; GCN-NEXT: store i32 4144959, ptr addrspace(1) [[PRINTBUFFPTRCAST]], align 4
@@ -821,7 +1356,7 @@ define amdgpu_kernel void @test_print_string_literal_size17(i32 %n) {
; GCN: 1:
; GCN-NEXT: [[PRINTBUFFID:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 0
; GCN-NEXT: [[PRINTBUFFIDCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFID]] to ptr addrspace(1)
-; GCN-NEXT: store i32 22, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
+; GCN-NEXT: store i32 31, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
; GCN-NEXT: [[PRINTBUFFGEP:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 4
; GCN-NEXT: [[PRINTBUFFPTRCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFGEP]] to ptr addrspace(1)
; GCN-NEXT: store i32 4144959, ptr addrspace(1) [[PRINTBUFFPTRCAST]], align 4
@@ -853,7 +1388,7 @@ define amdgpu_kernel void @test_print_string_literal_size20(i32 %n) {
; GCN: 1:
; GCN-NEXT: [[PRINTBUFFID:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 0
; GCN-NEXT: [[PRINTBUFFIDCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFID]] to ptr addrspace(1)
-; GCN-NEXT: store i32 23, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
+; GCN-NEXT: store i32 32, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
; GCN-NEXT: [[PRINTBUFFGEP:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 4
; GCN-NEXT: [[PRINTBUFFPTRCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFGEP]] to ptr addrspace(1)
; GCN-NEXT: store i32 4144959, ptr addrspace(1) [[PRINTBUFFPTRCAST]], align 4
@@ -885,7 +1420,7 @@ define amdgpu_kernel void @test_print_string_literal_size32(i32 %n) {
; GCN: 1:
; GCN-NEXT: [[PRINTBUFFID:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 0
; GCN-NEXT: [[PRINTBUFFIDCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFID]] to ptr addrspace(1)
-; GCN-NEXT: store i32 24, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
+; GCN-NEXT: store i32 33, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
; GCN-NEXT: [[PRINTBUFFGEP:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 4
; GCN-NEXT: [[PRINTBUFFPTRCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFGEP]] to ptr addrspace(1)
; GCN-NEXT: store i32 4144959, ptr addrspace(1) [[PRINTBUFFPTRCAST]], align 4
@@ -917,7 +1452,7 @@ define amdgpu_kernel void @test_print_string_not_constant_global(i32 %n) {
; GCN: 1:
; GCN-NEXT: [[PRINTBUFFID:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 0
; GCN-NEXT: [[PRINTBUFFIDCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFID]] to ptr addrspace(1)
-; GCN-NEXT: store i32 25, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
+; GCN-NEXT: store i32 34, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
; GCN-NEXT: [[PRINTBUFFGEP:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 4
; GCN-NEXT: [[PRINTBUFFPTRCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFGEP]] to ptr addrspace(1)
; GCN-NEXT: store i32 4144959, ptr addrspace(1) [[PRINTBUFFPTRCAST]], align 4
@@ -949,7 +1484,7 @@ define amdgpu_kernel void @test_print_string_constant_interposable_global(i32 %n
; GCN: 1:
; GCN-NEXT: [[PRINTBUFFID:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 0
; GCN-NEXT: [[PRINTBUFFIDCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFID]] to ptr addrspace(1)
-; GCN-NEXT: store i32 26, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
+; GCN-NEXT: store i32 35, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
; GCN-NEXT: [[PRINTBUFFGEP:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 4
; GCN-NEXT: [[PRINTBUFFPTRCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFGEP]] to ptr addrspace(1)
; GCN-NEXT: store i32 4144959, ptr addrspace(1) [[PRINTBUFFPTRCAST]], align 4
@@ -981,7 +1516,7 @@ define amdgpu_kernel void @test_print_string_literal_v4i8(i32 %n) {
; GCN: 1:
; GCN-NEXT: [[PRINTBUFFID:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 0
; GCN-NEXT: [[PRINTBUFFIDCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFID]] to ptr addrspace(1)
-; GCN-NEXT: store i32 27, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
+; GCN-NEXT: store i32 36, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
; GCN-NEXT: [[PRINTBUFFGEP:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 4
; GCN-NEXT: [[PRINTBUFFPTRCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFGEP]] to ptr addrspace(1)
; GCN-NEXT: store i32 4144959, ptr addrspace(1) [[PRINTBUFFPTRCAST]], align 4
@@ -1013,7 +1548,7 @@ define amdgpu_kernel void @test_print_string_literal_v4i32(i32 %n) {
; GCN: 1:
; GCN-NEXT: [[PRINTBUFFID:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 0
; GCN-NEXT: [[PRINTBUFFIDCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFID]] to ptr addrspace(1)
-; GCN-NEXT: store i32 28, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
+; GCN-NEXT: store i32 37, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
; GCN-NEXT: [[PRINTBUFFGEP:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 4
; GCN-NEXT: [[PRINTBUFFPTRCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFGEP]] to ptr addrspace(1)
; GCN-NEXT: store i32 4144959, ptr addrspace(1) [[PRINTBUFFPTRCAST]], align 4
@@ -1045,7 +1580,7 @@ define amdgpu_kernel void @test_print_string_literal_struct(i32 %n) {
; GCN: 1:
; GCN-NEXT: [[PRINTBUFFID:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 0
; GCN-NEXT: [[PRINTBUFFIDCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFID]] to ptr addrspace(1)
-; GCN-NEXT: store i32 29, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
+; GCN-NEXT: store i32 38, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
; GCN-NEXT: [[PRINTBUFFGEP:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 4
; GCN-NEXT: [[PRINTBUFFPTRCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFGEP]] to ptr addrspace(1)
; GCN-NEXT: store i32 4144959, ptr addrspace(1) [[PRINTBUFFPTRCAST]], align 4
@@ -1077,7 +1612,7 @@ define amdgpu_kernel void @test_print_string_undef(i32 %n) {
; GCN: 1:
; GCN-NEXT: [[PRINTBUFFID:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 0
; GCN-NEXT: [[PRINTBUFFIDCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFID]] to ptr addrspace(1)
-; GCN-NEXT: store i32 30, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
+; GCN-NEXT: store i32 39, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
; GCN-NEXT: [[PRINTBUFFGEP:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 4
; GCN-NEXT: [[PRINTBUFFPTRCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFGEP]] to ptr addrspace(1)
; GCN-NEXT: store i32 4144959, ptr addrspace(1) [[PRINTBUFFPTRCAST]], align 4
@@ -1109,7 +1644,7 @@ define amdgpu_kernel void @test_print_string_poison(i32 %n) {
; GCN: 1:
; GCN-NEXT: [[PRINTBUFFID:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 0
; GCN-NEXT: [[PRINTBUFFIDCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFID]] to ptr addrspace(1)
-; GCN-NEXT: store i32 31, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
+; GCN-NEXT: store i32 40, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
; GCN-NEXT: [[PRINTBUFFGEP:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 4
; GCN-NEXT: [[PRINTBUFFPTRCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFGEP]] to ptr addrspace(1)
; GCN-NEXT: store i32 4144959, ptr addrspace(1) [[PRINTBUFFPTRCAST]], align 4
@@ -1141,7 +1676,7 @@ define amdgpu_kernel void @test_print_string_null(i32 %n) {
; GCN: 1:
; GCN-NEXT: [[PRINTBUFFID:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 0
; GCN-NEXT: [[PRINTBUFFIDCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFID]] to ptr addrspace(1)
-; GCN-NEXT: store i32 32, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
+; GCN-NEXT: store i32 41, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
; GCN-NEXT: [[PRINTBUFFGEP:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 4
; GCN-NEXT: [[PRINTBUFFPTRCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFGEP]] to ptr addrspace(1)
; GCN-NEXT: store i32 4144959, ptr addrspace(1) [[PRINTBUFFPTRCAST]], align 4
@@ -1173,7 +1708,7 @@ define amdgpu_kernel void @test_print_string_inttoptr(i32 %n) {
; GCN: 1:
; GCN-NEXT: [[PRINTBUFFID:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 0
; GCN-NEXT: [[PRINTBUFFIDCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFID]] to ptr addrspace(1)
-; GCN-NEXT: store i32 33, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
+; GCN-NEXT: store i32 42, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
; GCN-NEXT: [[PRINTBUFFGEP:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 4
; GCN-NEXT: [[PRINTBUFFPTRCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFGEP]] to ptr addrspace(1)
; GCN-NEXT: store i32 4144959, ptr addrspace(1) [[PRINTBUFFPTRCAST]], align 4
@@ -1205,7 +1740,7 @@ define amdgpu_kernel void @test_print_string_float_neg0(i32 %n) {
; GCN: 1:
; GCN-NEXT: [[PRINTBUFFID:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 0
; GCN-NEXT: [[PRINTBUFFIDCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFID]] to ptr addrspace(1)
-; GCN-NEXT: store i32 34, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
+; GCN-NEXT: store i32 43, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
; GCN-NEXT: [[PRINTBUFFGEP:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 4
; GCN-NEXT: [[PRINTBUFFPTRCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFGEP]] to ptr addrspace(1)
; GCN-NEXT: store i32 4144959, ptr addrspace(1) [[PRINTBUFFPTRCAST]], align 4
@@ -1237,7 +1772,7 @@ define amdgpu_kernel void @test_print_string_float_0(i32 %n) {
; GCN: 1:
; GCN-NEXT: [[PRINTBUFFID:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 0
; GCN-NEXT: [[PRINTBUFFIDCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFID]] to ptr addrspace(1)
-; GCN-NEXT: store i32 35, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
+; GCN-NEXT: store i32 44, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
; GCN-NEXT: [[PRINTBUFFGEP:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 4
; GCN-NEXT: [[PRINTBUFFPTRCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFGEP]] to ptr addrspace(1)
; GCN-NEXT: store i32 4144959, ptr addrspace(1) [[PRINTBUFFPTRCAST]], align 4
@@ -1269,7 +1804,7 @@ define amdgpu_kernel void @test_print_string_ptr_null(i32 %n) {
; GCN: 1:
; GCN-NEXT: [[PRINTBUFFID:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 0
; GCN-NEXT: [[PRINTBUFFIDCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFID]] to ptr addrspace(1)
-; GCN-NEXT: store i32 36, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
+; GCN-NEXT: store i32 45, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
; GCN-NEXT: [[PRINTBUFFGEP:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 4
; GCN-NEXT: [[PRINTBUFFPTRCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFGEP]] to ptr addrspace(1)
; GCN-NEXT: store i32 4144959, ptr addrspace(1) [[PRINTBUFFPTRCAST]], align 4
@@ -1301,7 +1836,7 @@ define amdgpu_kernel void @test_print_string_ptr_undef(i32 %n) {
; GCN: 1:
; GCN-NEXT: [[PRINTBUFFID:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 0
; GCN-NEXT: [[PRINTBUFFIDCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFID]] to ptr addrspace(1)
-; GCN-NEXT: store i32 37, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
+; GCN-NEXT: store i32 46, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
; GCN-NEXT: [[PRINTBUFFGEP:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 4
; GCN-NEXT: [[PRINTBUFFPTRCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFGEP]] to ptr addrspace(1)
; GCN-NEXT: store i32 4144959, ptr addrspace(1) [[PRINTBUFFPTRCAST]], align 4
@@ -1333,7 +1868,7 @@ define amdgpu_kernel void @test_print_string_indexed(i32 %n) {
; GCN: 1:
; GCN-NEXT: [[PRINTBUFFID:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 0
; GCN-NEXT: [[PRINTBUFFIDCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFID]] to ptr addrspace(1)
-; GCN-NEXT: store i32 38, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
+; GCN-NEXT: store i32 47, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
; GCN-NEXT: [[PRINTBUFFGEP:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 4
; GCN-NEXT: [[PRINTBUFFPTRCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFGEP]] to ptr addrspace(1)
; GCN-NEXT: store i32 1953722977, ptr addrspace(1) [[PRINTBUFFPTRCAST]], align 4
@@ -1386,7 +1921,7 @@ define amdgpu_kernel void @test_print_string_indexed_oob(i32 %n) {
; GCN: 1:
; GCN-NEXT: [[PRINTBUFFID:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 0
; GCN-NEXT: [[PRINTBUFFIDCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFID]] to ptr addrspace(1)
-; GCN-NEXT: store i32 39, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
+; GCN-NEXT: store i32 48, ptr addrspace(1) [[PRINTBUFFIDCAST]], align 4
; GCN-NEXT: [[PRINTBUFFGEP:%.*]] = getelementptr i8, ptr addrspace(1) [[PRINTF_ALLOC_FN]], i32 4
; GCN-NEXT: [[PRINTBUFFPTRCAST:%.*]] = bitcast ptr addrspace(1) [[PRINTBUFFGEP]] to ptr addrspace(1)
; GCN-NEXT: store i32 1953722977, ptr addrspace(1) [[PRINTBUFFPTRCAST]], align 4
More information about the llvm-commits
mailing list