[clang] [llvm] [HLSL] Implement support for HLSL intrinsic - saturate (PR #104619)

Farzon Lotfi via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 19 08:09:07 PDT 2024


================
@@ -362,6 +364,34 @@ static bool expandClampIntrinsic(CallInst *Orig, Intrinsic::ID ClampIntrinsic) {
   return true;
 }
 
+static bool expandSaturateIntrinsic(CallInst *SaturateCall) {
+  FunctionType *FT = SaturateCall->getFunctionType();
+  Type *FTRetTy = FT->getReturnType();
+  assert(FTRetTy == FT->getParamType(0) &&
----------------
farzonl wrote:

I think we should drop this for now. We likely won't be preserving any intrinsic specific behaviors.

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


More information about the llvm-commits mailing list