[clang] [llvm] [HLSL][DXIL] InterlockedOr and InterlockedOr64 builtins (PR #180804)

Alexander Johnston via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 9 09:53:40 PDT 2026


================
@@ -3651,6 +3464,22 @@ static bool CheckSamplingBuiltin(Sema &S, CallExpr *TheCall, SampleKind Kind) {
   return false;
 }
 
+static bool CheckShaderModelVersion(Sema *S, CallExpr *TheCall,
+                                    VersionTuple MinimumSMVersion) {
+  bool IsDXIL = S->getASTContext().getTargetInfo().getTriple().getArch() ==
+                llvm::Triple::dxil;
+  llvm::VersionTuple SMVersion =
+      S->getASTContext().getTargetInfo().getTriple().getOSVersion();
+  if (SMVersion < MinimumSMVersion && IsDXIL) {
----------------
Alexander-Johnston wrote:

Yes, SPIR-V (and any other future targets) will need their own restrictions implemented when we come to add them. I asked about this briefly on the discord a while back and consensus seemed to be to not place DXIL version restrictions on SPIR-V (and vice versa).

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


More information about the cfe-commits mailing list