[llvm] AMDGPU: Stop checking for r600 in printf pass (PR #183536)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 26 06:41:56 PST 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-amdgpu
Author: Matt Arsenault (arsenm)
<details>
<summary>Changes</summary>
Avoid adding the pass to the pipeline in the first place.
---
Patch is 43.94 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/183536.diff
3 Files Affected:
- (modified) llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp (-4)
- (modified) llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp (+11-5)
- (modified) llvm/test/CodeGen/AMDGPU/opencl-printf.ll (-340)
``````````diff
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp b/llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp
index d3fa423d6099f..acf9923209295 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp
@@ -429,10 +429,6 @@ bool AMDGPUPrintfRuntimeBindingImpl::lowerPrintfForGpu(Module &M) {
}
bool AMDGPUPrintfRuntimeBindingImpl::run(Module &M) {
- Triple TT(M.getTargetTriple());
- if (TT.getArch() == Triple::r600)
- return false;
-
auto *PrintfFunction = M.getFunction("printf");
if (!PrintfFunction || !PrintfFunction->isDeclaration() ||
M.getModuleFlag("openmp"))
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp b/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
index 0585379a7abdb..1114a1105237c 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
@@ -940,9 +940,9 @@ void AMDGPUTargetMachine::registerPassBuilderCallbacks(PassBuilder &PB) {
});
PB.registerPipelineEarlySimplificationEPCallback(
- [](ModulePassManager &PM, OptimizationLevel Level,
- ThinOrFullLTOPhase Phase) {
- if (!isLTOPreLink(Phase)) {
+ [this](ModulePassManager &PM, OptimizationLevel Level,
+ ThinOrFullLTOPhase Phase) {
+ if (!isLTOPreLink(Phase) && getTargetTriple().isAMDGCN()) {
// When we are not using -fgpu-rdc, we can run accelerator code
// selection relatively early, but still after linking to prevent
// eager removal of potentially reachable symbols.
@@ -950,6 +950,7 @@ void AMDGPUTargetMachine::registerPassBuilderCallbacks(PassBuilder &PB) {
PM.addPass(HipStdParMathFixupPass());
PM.addPass(HipStdParAcceleratorCodeSelectionPass());
}
+
PM.addPass(AMDGPUPrintfRuntimeBindingPass());
}
@@ -1382,7 +1383,9 @@ void AMDGPUPassConfig::addIRPasses() {
disablePass(&FuncletLayoutID);
disablePass(&PatchableFunctionID);
- addPass(createAMDGPUPrintfRuntimeBinding());
+ if (TM.getTargetTriple().isAMDGCN())
+ addPass(createAMDGPUPrintfRuntimeBinding());
+
if (LowerCtorDtor)
addPass(createAMDGPUCtorDtorLoweringLegacyPass());
@@ -2177,7 +2180,10 @@ void AMDGPUCodeGenPassBuilder::addIRPasses(PassManagerWrapper &PMW) const {
}
flushFPMsToMPM(PMW);
- addModulePass(AMDGPUPrintfRuntimeBindingPass(), PMW);
+
+ if (TM.getTargetTriple().isAMDGCN())
+ addModulePass(AMDGPUPrintfRuntimeBindingPass(), PMW);
+
if (LowerCtorDtor)
addModulePass(AMDGPUCtorDtorLoweringPass(), PMW);
diff --git a/llvm/test/CodeGen/AMDGPU/opencl-printf.ll b/llvm/test/CodeGen/AMDGPU/opencl-printf.ll
index 897731ebf5693..be0505bee9a5a 100644
--- a/llvm/test/CodeGen/AMDGPU/opencl-printf.ll
+++ b/llvm/test/CodeGen/AMDGPU/opencl-printf.ll
@@ -1,5 +1,4 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -mtriple=r600-- -passes=amdgpu-printf-runtime-binding -mcpu=r600 -S < %s | FileCheck --check-prefix=R600 %s
; RUN: opt -mtriple=amdgcn-- -passes=amdgpu-printf-runtime-binding -mcpu=fiji -S < %s | FileCheck --check-prefix=GCN %s
; RUN: opt -mtriple=amdgcn--amdhsa -passes=amdgpu-printf-runtime-binding -mcpu=fiji -S < %s | FileCheck --check-prefix=GCN %s
@@ -55,11 +54,6 @@
define amdgpu_kernel void @format_str_f(float %f32.0, double %f64, float %f32.1, i16 %i16, i32 %i32, i64 %i64, half %f16) {
-; 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>, half [[F16:%.*]])
-; 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
@@ -106,11 +100,6 @@ define amdgpu_kernel void @format_str_f(float %f32.0, double %f64, float %f32.1,
}
define amdgpu_kernel void @format_str_F(float %f32.0, double %f64, float %f32.1, i16 %i16, i32 %i32, i64 %i64, half %f16) {
-; 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>, half [[F16:%.*]])
-; R600-NEXT: ret void
-;
; GCN-LABEL: @format_str_F(
; GCN-NEXT: [[FPEXT_F32_TO_F64:%.*]] = fpext float [[F32_1:%.*]] to double
; GCN-NEXT: [[TMP4:%.*]] = sext i16 [[I16:%.*]] to i32
@@ -157,11 +146,6 @@ define amdgpu_kernel void @format_str_F(float %f32.0, double %f64, float %f32.1,
}
define amdgpu_kernel void @format_str_a(float %f32.0, double %f64, float %f32.1, i16 %i16, i32 %i32, i64 %i64, half %f16) {
-; R600-LABEL: @format_str_a(
-; R600-NEXT: [[FPEXT_F32_TO_F64:%.*]] = fpext float [[F32_1:%.*]] to double
-; R600-NEXT: [[CALL1:%.*]] = call i32 @printf(ptr addrspace(4) @format.str.a, 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>, half [[F16:%.*]])
-; R600-NEXT: ret void
-;
; GCN-LABEL: @format_str_a(
; GCN-NEXT: [[FPEXT_F32_TO_F64:%.*]] = fpext float [[F32_1:%.*]] to double
; GCN-NEXT: [[TMP1:%.*]] = sext i16 [[I16:%.*]] to i32
@@ -208,11 +192,6 @@ define amdgpu_kernel void @format_str_a(float %f32.0, double %f64, float %f32.1,
}
define amdgpu_kernel void @format_str_A(float %f32.0, double %f64, float %f32.1, i16 %i16, i32 %i32, i64 %i64, half %f16) {
-; R600-LABEL: @format_str_A(
-; R600-NEXT: [[FPEXT_F32_TO_F64:%.*]] = fpext float [[F32_1:%.*]] to double
-; R600-NEXT: [[CALL1:%.*]] = call i32 @printf(ptr addrspace(4) @format.str.A, 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>, half [[F16:%.*]])
-; R600-NEXT: ret void
-;
; GCN-LABEL: @format_str_A(
; GCN-NEXT: [[FPEXT_F32_TO_F64:%.*]] = fpext float [[F32_1:%.*]] to double
; GCN-NEXT: [[TMP4:%.*]] = sext i16 [[I16:%.*]] to i32
@@ -259,10 +238,6 @@ define amdgpu_kernel void @format_str_A(float %f32.0, double %f64, float %f32.1,
}
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 36)
; GCN-NEXT: br label [[DOTSPLIT:%.*]]
@@ -292,10 +267,6 @@ define void @format_str_ptr(ptr %ptr.flat, ptr addrspace(3) %ptr.lds, ptr addrsp
}
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
@@ -339,10 +310,6 @@ define amdgpu_kernel void @format_str_d(i1 %i1, i4 %i4, i8 %i8, i24 %i24, i16 %i
}
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
@@ -386,11 +353,6 @@ define amdgpu_kernel void @format_str_u(i1 %i1, i4 %i4, i8 %i8, i24 %i24, i16 %i
}
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,
-; R600-LABEL: @format_str_v1(
-; R600-NEXT: [[V1F32_1_FPEXT:%.*]] = fpext <1 x float> [[V1F32_1:%.*]] to <1 x double>
-; R600-NEXT: [[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:%.*]])
-; R600-NEXT: ret void
-;
; GCN-LABEL: @format_str_v1(
; GCN-NEXT: [[V1F32_1_FPEXT:%.*]] = fpext <1 x float> [[V1F32_1:%.*]] to <1 x double>
; GCN-NEXT: [[TMP1:%.*]] = sext <1 x i8> [[V1I8:%.*]] to <1 x i32>
@@ -431,11 +393,6 @@ define void @format_str_v1(<1 x float> %v1f32.0, <1 x float> %v1f32.1, <1 x doub
}
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>
@@ -475,11 +432,6 @@ define void @format_str_v2(<2 x float> %v2f32.0, <2 x float> %v2f32.1, <2 x doub
}
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)
@@ -518,11 +470,6 @@ define void @format_str_v3(<3 x float> %v3f32.0, <3 x float> %v3f32.1, <3 x doub
}
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)
@@ -561,11 +508,6 @@ define void @format_str_v4(<4 x float> %v4f32.0, <4 x float> %v4f32.1, <4 x doub
}
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)
@@ -604,11 +546,6 @@ define void @format_str_v8(<8 x float> %v8f32.0, <8 x float> %v8f32.1, <8 x doub
}
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)
@@ -647,12 +584,6 @@ define void @format_str_v16(<16 x float> %v16f32.0, <16 x float> %v16f32.1, <16
}
define amdgpu_kernel void @test_kernel(i32 %n) {
-; R600-LABEL: @test_kernel(
-; R600-NEXT: entry:
-; R600-NEXT: [[STR:%.*]] = alloca [9 x i8], align 1, addrspace(5)
-; R600-NEXT: [[CALL1:%.*]] = call i32 (ptr addrspace(4), ...) @printf(ptr addrspace(4) @.str, ptr addrspace(5) [[STR]], i32 [[N:%.*]])
-; R600-NEXT: ret void
-;
; GCN-LABEL: @test_kernel(
; GCN-NEXT: entry:
; GCN-NEXT: [[STR:%.*]] = alloca [9 x i8], align 1, addrspace(5)
@@ -680,11 +611,6 @@ entry:
}
define amdgpu_kernel void @test_format_str_no_null_terminator(i32 %n) {
-; R600-LABEL: @test_format_str_no_null_terminator(
-; R600-NEXT: entry:
-; R600-NEXT: [[CALL1:%.*]] = call i32 (ptr addrspace(4), ...) @printf(ptr addrspace(4) @format.str.no.null.terminator, i32 [[N:%.*]])
-; R600-NEXT: ret void
-;
; GCN-LABEL: @test_format_str_no_null_terminator(
; GCN-NEXT: entry:
; GCN-NEXT: [[PRINTF_ALLOC_FN:%.*]] = call ptr addrspace(1) @__printf_alloc(i32 8)
@@ -709,11 +635,6 @@ entry:
define amdgpu_kernel void @test_indexed_format_str(i32 %n) {
-; R600-LABEL: @test_indexed_format_str(
-; R600-NEXT: entry:
-; R600-NEXT: [[CALL1:%.*]] = call i32 (ptr addrspace(4), ...) @printf(ptr addrspace(4) getelementptr ([11 x i8], ptr addrspace(4) @indexed.format.str, i64 0, i32 7), i32 [[N:%.*]])
-; R600-NEXT: ret void
-;
; GCN-LABEL: @test_indexed_format_str(
; GCN-NEXT: entry:
; GCN-NEXT: [[PRINTF_ALLOC_FN:%.*]] = call ptr addrspace(1) @__printf_alloc(i32 8)
@@ -737,11 +658,6 @@ entry:
}
define amdgpu_kernel void @test_indexed_format_str_oob(i32 %n) {
-; R600-LABEL: @test_indexed_format_str_oob(
-; R600-NEXT: entry:
-; R600-NEXT: [[CALL1:%.*]] = call i32 (ptr addrspace(4), ...) @printf(ptr addrspace(4) getelementptr ([11 x i8], ptr addrspace(4) @indexed.format.str, i64 0, i64 11), i32 [[N:%.*]])
-; R600-NEXT: ret void
-;
; GCN-LABEL: @test_indexed_format_str_oob(
; GCN-NEXT: entry:
; GCN-NEXT: [[PRINTF_ALLOC_FN:%.*]] = call ptr addrspace(1) @__printf_alloc(i32 4)
@@ -764,11 +680,6 @@ entry:
}
define amdgpu_kernel void @string_pointee_type(i32 %n) {
-; R600-LABEL: @string_pointee_type(
-; R600-NEXT: [[STR:%.*]] = alloca [9 x i8], align 1, addrspace(5)
-; R600-NEXT: [[CALL1:%.*]] = call i32 (ptr addrspace(4), ...) @printf(ptr addrspace(4) @.str, ptr addrspace(5) [[STR]], i32 [[N:%.*]])
-; R600-NEXT: ret void
-;
; GCN-LABEL: @string_pointee_type(
; GCN-NEXT: [[STR:%.*]] = alloca [9 x i8], align 1, addrspace(5)
; GCN-NEXT: [[PRINTF_ALLOC_FN:%.*]] = call ptr addrspace(1) @__printf_alloc(i32 12)
@@ -794,10 +705,6 @@ define amdgpu_kernel void @string_pointee_type(i32 %n) {
}
define amdgpu_kernel void @string_address_space4(i32 %n, ptr addrspace(4) %str) {
-; R600-LABEL: @string_address_space4(
-; R600-NEXT: [[CALL1:%.*]] = call i32 (ptr addrspace(4), ...) @printf(ptr addrspace(4) @.str, ptr addrspace(4) [[STR:%.*]], i32 [[N:%.*]])
-; R600-NEXT: ret void
-;
; GCN-LABEL: @string_address_space4(
; GCN-NEXT: [[PRINTF_ALLOC_FN:%.*]] = call ptr addrspace(1) @__printf_alloc(i32 12)
; GCN-NEXT: br label [[DOTSPLIT:%.*]]
@@ -821,10 +728,6 @@ define amdgpu_kernel void @string_address_space4(i32 %n, ptr addrspace(4) %str)
}
define amdgpu_kernel void @string_address_space1(i32 %n, ptr addrspace(1) %str) {
-; R600-LABEL: @string_address_space1(
-; R600-NEXT: [[CALL1:%.*]] = call i32 (ptr addrspace(4), ...) @printf(ptr addrspace(4) @.str, ptr addrspace(1) [[STR:%.*]], i32 [[N:%.*]])
-; R600-NEXT: ret void
-;
; GCN-LABEL: @string_address_space1(
; GCN-NEXT: [[PRINTF_ALLOC_FN:%.*]] = call ptr addrspace(1) @__printf_alloc(i32 12)
; GCN-NEXT: br label [[DOTSPLIT:%.*]]
@@ -848,10 +751,6 @@ define amdgpu_kernel void @string_address_space1(i32 %n, ptr addrspace(1) %str)
}
define amdgpu_kernel void @string_format_passed_i32(i32 %n, i32 %str) {
-; R600-LABEL: @string_format_passed_i32(
-; R600-NEXT: [[CALL1:%.*]] = call i32 (ptr addrspace(4), ...) @printf(ptr addrspace(4) @.str, i32 [[STR:%.*]], i32 [[N:%.*]])
-; R600-NEXT: ret void
-;
; GCN-LABEL: @string_format_passed_i32(
; GCN-NEXT: [[PRINTF_ALLOC_FN:%.*]] = call ptr addrspace(1) @__printf_alloc(i32 12)
; GCN-NEXT: br label [[DOTSPLIT:%.*]]
@@ -878,13 +777,6 @@ define amdgpu_kernel void @string_format_passed_i32(i32 %n, i32 %str) {
@str.as1 = private unnamed_addr addrspace(1) constant [6 x i8] c"%s:%d\00", align 1
define amdgpu_kernel void @test_kernel_addrspacecasted_format_str(i32 %n) {
-; R600-LABEL: @test_kernel_addrspacecasted_format_str(
-; R600-NEXT: entry:
-; R600-NEXT: [[STR:%.*]] = alloca [9 x i8], align 1, addrspace(5)
-; R600-NEXT: [[ARRAYDECAY:%.*]] = getelementptr inbounds [9 x i8], ptr addrspace(5) [[STR]], i32 0, i32 0
-; R600-NEXT: [[CALL1:%.*]] = call i32 (ptr addrspace(4), ...) @printf(ptr addrspace(4) addrspacecast (ptr addrspace(1) @str.as1 to ptr addrspace(4)), ptr addrspace(5) [[ARRAYDECAY]], i32 [[N:%.*]])
-; R600-NEXT: ret void
-;
; GCN-LABEL: @test_kernel_addrspacecasted_format_str(
; GCN-NEXT: entry:
; GCN-NEXT: [[STR:%.*]] = alloca [9 x i8], align 1, addrspace(5)
@@ -914,11 +806,6 @@ entry:
}
define amdgpu_kernel void @test_undef_argument(i32 %n) {
-; R600-LABEL: @test_undef_argument(
-; R600-NEXT: [[STR:%.*]] = alloca [9 x i8], align 1, addrspace(5)
-; R600-NEXT: [[CALL1:%.*]] = call i32 (ptr addrspace(4), ...) @printf(ptr addrspace(4) poison, ptr addrspace(5) [[STR]], i32 [[N:%.*]])
-; R600-NEXT: ret void
-;
; ...
[truncated]
``````````
</details>
https://github.com/llvm/llvm-project/pull/183536
More information about the llvm-commits
mailing list