[clang] [clang][HLSL] Add radians intrinsic (PR #110802)

Farzon Lotfi via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 2 12:40:13 PDT 2024


================
@@ -18852,6 +18852,14 @@ case Builtin::BI__builtin_hlsl_elementwise_isinf: {
         retType, CGM.getHLSLRuntime().getSignIntrinsic(),
         ArrayRef<Value *>{Op0}, nullptr, "hlsl.sign");
   }
+  case Builtin::BI__builtin_hlsl_elementwise_radians: {
+    Value *Op0 = EmitScalarExpr(E->getArg(0));
+    if (!E->getArg(0)->getType()->hasFloatingRepresentation())
----------------
farzonl wrote:

Line 1864 of  `SemaHLSL.cpp` you have a check for this, Turn this into an assert.
 

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


More information about the cfe-commits mailing list