aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/ModuloSchedule.cpp
diff options
context:
space:
mode:
authorFarzon Lotfi <1802579+farzonl@users.noreply.github.com>2024-03-15 20:57:08 -0400
committerGitHub <noreply@github.com>2024-03-15 20:57:08 -0400
commit8386a388bd4f144889401cc503b2c51bf4bb9275 (patch)
tree0bc9f43cb6cc3ab7088c6261641ae9955f50733b /llvm/lib/CodeGen/ModuloSchedule.cpp
parent113214e15b5ce3f3ec313eb1fa91a7038ecd072f (diff)
downloadllvm-8386a388bd4f144889401cc503b2c51bf4bb9275.zip
llvm-8386a388bd4f144889401cc503b2c51bf4bb9275.tar.gz
llvm-8386a388bd4f144889401cc503b2c51bf4bb9275.tar.bz2
[HLSL] implement `clamp` intrinsic (#85424)
closes #70071 - `CGBuiltin.cpp` - Add the unsigned\generic clamp intrinsic emitter. - `IntrinsicsDirectX.td` - add the `dx.clamp` & `dx.uclamp` intrinsics - `DXILIntrinsicExpansion.cpp` - add the `clamp` instruction expansion while maintaining vector form. - `SemaChecking.cpp` - Add `clamp` builtin Sema Checks. - `Builtins.td` - add a `clamp` builtin - `hlsl_intrinsics.h` - add the `clamp` api Why `clamp` as instruction expansion for DXIL? 1. SPIR-V has a GLSL `clamp` extension via: - [FClamp](https://registry.khronos.org/SPIR-V/specs/1.0/GLSL.std.450.html#FClamp) - [UClamp](https://registry.khronos.org/SPIR-V/specs/1.0/GLSL.std.450.html#UClamp) - [SClamp](https://registry.khronos.org/SPIR-V/specs/1.0/GLSL.std.450.html#SClamp) 2. Further Clamp lowers to `min(max( x, min_range ), max_range)` which we have float, signed, & unsigned dixilOps.
Diffstat (limited to 'llvm/lib/CodeGen/ModuloSchedule.cpp')
0 files changed, 0 insertions, 0 deletions