File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -294,6 +294,14 @@ class DXILPrepareModule : public ModulePass {
294294 if (NamedMDNode *RootSignature = M.getNamedMetadata (" dx.rootsignatures" ))
295295 RootSignature->eraseFromParent ();
296296
297+ // llvm.errno.tbaa was recently added but is not supported in LLVM 3.7 and
298+ // causes all tests using the DXIL Validator to fail.
299+ //
300+ // This is a temporary fix and should be replaced with a whitelist once
301+ // we have determined all metadata that the DXIL Validator allows
302+ if (NamedMDNode *ErrNo = M.getNamedMetadata (" llvm.errno.tbaa" ))
303+ ErrNo->eraseFromParent ();
304+
297305 return true ;
298306 }
299307
Original file line number Diff line number Diff line change 1+ ; RUN: opt -S -dxil-prepare < %s | FileCheck %s
2+
3+ ; Ensures that dxil-prepare will remove the llvm.errno.tbaa metadata
4+
5+ target triple = "dxil-unknown-shadermodel6.0-compute"
6+
7+ define void @main () {
8+ entry:
9+ ret void
10+ }
11+
12+ ; CHECK-NOT: !llvm.errno.tbaa
13+ ; CHECK-NOT: {{^!}}
14+
15+ !llvm.errno.tbaa = !{!0 }
16+
17+ !0 = !{!1 , !1 , i64 0 }
18+ !1 = !{!"omnipotent char" , !2 }
19+ !2 = !{!"Simple C/C++ TBAA" }
You can’t perform that action at this time.
0 commit comments