[clang] [llvm] [HLSL] implement `clamp` intrinsic (PR #85424)
Farzon Lotfi via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 15 12:43:11 PDT 2024
================
@@ -132,12 +134,60 @@ static bool expandRcpIntrinsic(CallInst *Orig) {
return true;
}
+static Intrinsic::ID getCorrectMaxIntrinsic(Type *elemTy,
+ Intrinsic::ID clampIntrinsic) {
----------------
farzonl wrote:
Will do.
As an aside this function started off generic until I found out I couldn't use `getSignBit()` to distinguish unsigned clamp vs signed clamp. The only way I could determine signed-ness was in codeGen.
https://github.com/llvm/llvm-project/pull/85424
More information about the llvm-commits
mailing list