[clang] [llvm] [HLSL] implement `clamp` intrinsic (PR #85424)

Justin Bogner via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 15 12:11:18 PDT 2024


================
@@ -132,12 +134,60 @@ static bool expandRcpIntrinsic(CallInst *Orig) {
   return true;
 }
 
+static Intrinsic::ID getCorrectMaxIntrinsic(Type *elemTy,
+                                            Intrinsic::ID clampIntrinsic) {
----------------
bogner wrote:

I could see us needing to get a max intrinsic in some other context at some point. Maybe a more specific name like `getMaxForClamp` is better.

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


More information about the cfe-commits mailing list