diff --git a/tools/clang/test/LitDXILValidation/illegalDXILOp.ll b/tools/clang/test/LitDXILValidation/illegalDXILOp.ll index bb1309fddf..1ff27428ef 100644 --- a/tools/clang/test/LitDXILValidation/illegalDXILOp.ll +++ b/tools/clang/test/LitDXILValidation/illegalDXILOp.ll @@ -39,7 +39,7 @@ define void @main() { %6 = call %dx.types.Handle @dx.op.annotateHandle2(i32 216, %dx.types.Handle %2, %dx.types.ResourceProperties { i32 32782, i32 0 }) ; AnnotateHandle(res,props) resource: SamplerComparisonState -; CHECK: error: DXILOpCode must be [0..258]. 1999981 specified. +; CHECK: error: DXILOpCode must be [0..{{[0-9]+}}]. 1999981 specified. ; CHECK: note: at '%7 = call float @dx.op.calculateLOD.f32(i32 1999981, %dx.types.Handle %5, %dx.types.Handle %6, float %3, float %4, float undef, i1 true)' in block '#0' of function 'main'. %7 = call float @dx.op.calculateLOD.f32(i32 1999981, %dx.types.Handle %5, %dx.types.Handle %6, float %3, float %4, float undef, i1 true) ; CalculateLOD(handle,sampler,coord0,coord1,coord2,clamped) diff --git a/tools/clang/test/lit.cfg b/tools/clang/test/lit.cfg index 04bb2b4196..e42297d2c9 100644 --- a/tools/clang/test/lit.cfg +++ b/tools/clang/test/lit.cfg @@ -507,12 +507,14 @@ if config.spirv: def get_dxil_version(): result = subprocess.run([lit.util.which('dxc', llvm_tools_dir), "--version"], stdout=subprocess.PIPE) output = result.stdout.decode("utf-8") - pat = re.compile(r"(dxcompiler.dll|libdxcompiler.so|libdxcompiler.dylib): (?P[0-9]+)\.(?P[0-9]+).*(; (dxil.dll|libdxil.so): (?P[0-9]+)\.(?P[0-9]+))?") - m = pat.search(output) + dxcPat = re.compile(r"(dxcompiler.dll|libdxcompiler.so|libdxcompiler.dylib): (?P[0-9]+)\.(?P[0-9]+).") + m = dxcPat.search(output) dxcMajor = int(m.group("dxcMajor")) dxcMinor = int(m.group("dxcMinor")) - if None == m.group("dxilMajor"): + dxilPat = re.compile(r"; (dxil.dll|libdxil.so): (?P[0-9]+)\.(?P[0-9]+)") + m = dxilPat.search(output) + if None == m: return dxcMajor, dxcMinor dxilMajor = int(m.group("dxilMajor")) dxilMinor = int(m.group("dxilMinor"))