[clang] [llvm] Add step builtins and step HLSL function to DirectX and SPIR-V backend (PR #106471)

Farzon Lotfi via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 11 15:46:28 PDT 2024


================
@@ -1490,6 +1490,18 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) {
     TheCall->setType(ArgTyA);
     break;
   }
+  case Builtin::BI__builtin_hlsl_step: {
+    if (CheckFloatOrHalfRepresentations(&SemaRef, TheCall))
+      return true;
+    if (SemaRef.checkArgCount(TheCall, 2))
----------------
farzonl wrote:

NIT: we usually check the arg count first. 

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


More information about the cfe-commits mailing list