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

S. Bharadwaj Yadavalli via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 5 11:56:04 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
----------------
bharadwajy wrote:

> (just checking) is "library" the right thing to use here, rather than "compute"? I don't think we're planning on support library shaders properly for a while and I wonder how stable the design is for anything involving them in clang.

I did consider specifying `compute`.

I noticed that tests in `clang/test/CodeGenHLSL/builtins/` have used the triple `dxil-pc-shadermodel6.3-library`. While it is not necessarily a very strong reason, I just chose to adapt the same string - particularly since the `EnvironmentType` is not consumed yet in the DXIL Op spec and/or lowering. I expect that to be part of changes in the near future - but can change it for now, if there is a strong push for it. 

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


More information about the llvm-commits mailing list