summaryrefslogtreecommitdiff
path: root/llvm/test/CodeGen/DirectX
diff options
context:
space:
mode:
authorFinn Plummer <mail@inbelic.dev>2025-10-21 12:30:13 -0700
committerGitHub <noreply@github.com>2025-10-21 12:30:13 -0700
commitbcf726793719c41ffc1a26fa421107bc98282d63 (patch)
tree984c9dc4162812886dbd18c764629f387dd3d4f8 /llvm/test/CodeGen/DirectX
parentc208a23643231d0b19c6f795895a16dfe6797340 (diff)
[DirectX] remove unrecognized 'llvm.errno.tbaa' named metadata for DXIL target (#164472)
This is a temporary measure to explicitly remove the unrecognized named metadata when targeting DXIL. This should be removed for an allowlist as tracked here: https://github.com/llvm/llvm-project/issues/164473.
Diffstat (limited to 'llvm/test/CodeGen/DirectX')
-rw-r--r--llvm/test/CodeGen/DirectX/strip-llvm-errno-tbaa.ll19
1 files changed, 19 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/DirectX/strip-llvm-errno-tbaa.ll b/llvm/test/CodeGen/DirectX/strip-llvm-errno-tbaa.ll
new file mode 100644
index 000000000000..9190d0305d63
--- /dev/null
+++ b/llvm/test/CodeGen/DirectX/strip-llvm-errno-tbaa.ll
@@ -0,0 +1,19 @@
+; RUN: opt -S -dxil-prepare < %s | FileCheck %s
+
+; Ensures that dxil-prepare will remove the llvm.errno.tbaa metadata
+
+target triple = "dxil-unknown-shadermodel6.0-compute"
+
+define void @main() {
+entry:
+ ret void
+}
+
+; CHECK-NOT: !llvm.errno.tbaa
+; CHECK-NOT: {{^!}}
+
+!llvm.errno.tbaa = !{!0}
+
+!0 = !{!1, !1, i64 0}
+!1 = !{!"omnipotent char", !2}
+!2 = !{!"Simple C/C++ TBAA"}