diff options
author | Pedro Lobo <pedro.lobo@tecnico.ulisboa.pt> | 2025-03-17 22:16:18 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-17 22:16:18 +0000 |
commit | ccf21094713e7a080a38f30144ea77b7cacf3064 (patch) | |
tree | 594bef226ea0974bc755e1e57f890d5f3f77d573 | |
parent | 5b9006550d7766f07dd1129e0f369ed28f0a8edb (diff) | |
download | llvm-ccf21094713e7a080a38f30144ea77b7cacf3064.zip llvm-ccf21094713e7a080a38f30144ea77b7cacf3064.tar.gz llvm-ccf21094713e7a080a38f30144ea77b7cacf3064.tar.bz2 |
[Metadata] Change placeholder from `undef` to `poison` (#131469)
Replace `undef` constant metadata uses with `poison`.
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.cpp | 2 | ||||
-rw-r--r-- | clang/test/CodeGenCUDASPIRV/spirv-attrs.cu | 2 | ||||
-rw-r--r-- | clang/test/CodeGenOpenCL/kernel-attributes.cl | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp index 447192b..a7fdfa6 100644 --- a/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/clang/lib/CodeGen/CodeGenFunction.cpp @@ -640,7 +640,7 @@ void CodeGenFunction::EmitKernelMetadata(const FunctionDecl *FD, HintQTy->isSignedIntegerType() || (HintEltQTy && HintEltQTy->getElementType()->isSignedIntegerType()); llvm::Metadata *AttrMDArgs[] = { - llvm::ConstantAsMetadata::get(llvm::UndefValue::get( + llvm::ConstantAsMetadata::get(llvm::PoisonValue::get( CGM.getTypes().ConvertType(A->getTypeHint()))), llvm::ConstantAsMetadata::get(llvm::ConstantInt::get( llvm::IntegerType::get(Context, 32), diff --git a/clang/test/CodeGenCUDASPIRV/spirv-attrs.cu b/clang/test/CodeGenCUDASPIRV/spirv-attrs.cu index 727e0e2..77319d4 100644 --- a/clang/test/CodeGenCUDASPIRV/spirv-attrs.cu +++ b/clang/test/CodeGenCUDASPIRV/spirv-attrs.cu @@ -30,5 +30,5 @@ __global__ void intel_reqd_sub_group_size_64() {} // CHECK: ![[WG_SIZE_ZEROS]] = !{i32 0, i32 0, i32 0} // CHECK: ![[WG_SIZE]] = !{i32 128, i32 1, i32 1} // CHECK: ![[WG_HINT]] = !{i32 2, i32 2, i32 2} -// CHECK: ![[VEC_HINT]] = !{i32 undef, i32 1} +// CHECK: ![[VEC_HINT]] = !{i32 poison, i32 1} // CHECK: ![[SUB_GRP]] = !{i32 64} diff --git a/clang/test/CodeGenOpenCL/kernel-attributes.cl b/clang/test/CodeGenOpenCL/kernel-attributes.cl index c9ecb14..3625138 100644 --- a/clang/test/CodeGenOpenCL/kernel-attributes.cl +++ b/clang/test/CodeGenOpenCL/kernel-attributes.cl @@ -11,8 +11,8 @@ kernel __attribute__((vec_type_hint(uint4))) __attribute__((work_group_size_hint kernel __attribute__((intel_reqd_sub_group_size(8))) void kernel3(int a) {} // CHECK: define {{(dso_local )?}}spir_kernel void @kernel3(i32 {{[^%]*}}%a) {{[^{]+}} !intel_reqd_sub_group_size ![[MD5:[0-9]+]] -// CHECK: [[MD1]] = !{i32 undef, i32 1} +// CHECK: [[MD1]] = !{i32 poison, i32 1} // CHECK: [[MD2]] = !{i32 1, i32 2, i32 4} -// CHECK: [[MD3]] = !{<4 x i32> undef, i32 0} +// CHECK: [[MD3]] = !{<4 x i32> poison, i32 0} // CHECK: [[MD4]] = !{i32 8, i32 16, i32 32} // CHECK: [[MD5]] = !{i32 8} |