================
@@ -101,6 +101,44 @@ bool SemaSPIRV::CheckSPIRVBuiltinFunctionCall(unsigned 
BuiltinID,
     TheCall->setType(RetTy);
     break;
   }
+  case SPIRV::BI__builtin_spirv_smoothstep: {
+    if (SemaRef.checkArgCount(TheCall, 3))
+      return true;
+
+    ExprResult A = TheCall->getArg(0);
+    QualType ArgTyA = A.get()->getType();
+    auto *VTyA = ArgTyA->getAs<VectorType>();
+    if (!(ArgTyA->isScalarType() || VTyA)) {
----------------
farzonl wrote:
this conditional is not correct args can ben vector scalar or matrix. There are 
two checks  that make sense here

1. All arguments have `hasFloatingRepresentation`
2. All arguments have the same type.

I don't think you need to do any more than this.

https://github.com/llvm/llvm-project/pull/132288
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to