aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp
diff options
context:
space:
mode:
authorrikhuijzer <rikhuijzer@pm.me>2023-06-07 10:09:17 -0700
committerJacques Pienaar <jpienaar@google.com>2023-06-07 10:09:24 -0700
commitcfdea8f5bb6b0138719c5b4f3fe1616b6ea915a7 (patch)
tree5dad7773429f2c64ecaf497651da63c94b9848b1 /llvm/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp
parent77302696a6e4b4c60536398e5d2b520681f99990 (diff)
downloadllvm-cfdea8f5bb6b0138719c5b4f3fe1616b6ea915a7.zip
llvm-cfdea8f5bb6b0138719c5b4f3fe1616b6ea915a7.tar.gz
llvm-cfdea8f5bb6b0138719c5b4f3fe1616b6ea915a7.tar.bz2
[MLIR][Tosa] Fix fp canonicalization for `clamp`
The canonicalization for `clamp` removed the `clamp` operation when the chosen min and max values were outside the range of what is possible to represent with the input type. For example, if the input type is `i8`, then the min and max values must be between -128 and 127. If the min and max are, say, -200 and 200, then the `clamp` operation can be safely removed. However, as pointed out by @wyanzhao, this is wrong for floating point types since they can represent infinity. Fixes #62341. Reviewed By: jpienaar Differential Revision: https://reviews.llvm.org/D152123
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp')
0 files changed, 0 insertions, 0 deletions