[llvm] [DXIL] Model DXIL Class and Shader Model association of DXIL Ops in DXIL.td (PR #87803)

Chris B via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 8 08:28:23 PDT 2024


================
@@ -1,5 +1,5 @@
 ; RUN: opt -S  -dxil-intrinsic-expansion  < %s | FileCheck %s --check-prefixes=CHECK,EXPCHECK
-; RUN: opt -S  -dxil-op-lower  < %s | FileCheck %s --check-prefixes=CHECK,DOPCHECK
+; RUN: opt -S  -dxil-op-lower  -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s --check-prefixes=CHECK,DOPCHECK
----------------
llvm-beanz wrote:

For the HLSL source tests we tend to use library shaders because they (1) don't require an entry point and (2) basically everything that is legal in all shader stages is legal in them.

That makes it easier for us to write tests that won't need updating as we implement more of the language and get stricter about enforcement.

Using the library triple on IR tests can in some situations provide a similar benefit, so it is probably the right approach.

https://github.com/llvm/llvm-project/pull/87803


More information about the llvm-commits mailing list