diff options
| author | hanbeom <kese111@gmail.com> | 2024-08-14 17:52:36 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-14 09:52:36 +0100 |
| commit | 0d074ba197166b4f00cc3b1b1011625eb7be0a53 (patch) | |
| tree | 504a79c48fe2ad197ccd5e745b746ef7ac2504b2 /lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPlatformPythonInterface/ScriptedPlatformPythonInterface.cpp | |
| parent | 5ab99bf1a757c5ad7115280f374d9af4f1b98bc9 (diff) | |
[DAG] Support saturated truncate (#99418)
A truncate is considered saturated if no additional conversion is required between the target and return values. If the target is saturated when attempting to truncate from a vector, there is an opportunity to optimize it.
Previously, each architecture had its own attempt at optimization, leading to redundant code. This patch implements common logic by introducing three new ISDs:
`ISD::TRUNCATE_SSAT_S`: When the operand is a signed value and the range of values matches the range of signed values of the destination type.
`ISD::TRUNCATE_SSAT_U`: When the operand is a signed value and the range of values matches the range of unsigned values of the destination type.
`ISD::TRUNCATE_USAT_U`: When the operand is an unsigned value and the range of values matches the range of unsigned values of the destination type.
These ISDs indicate a saturated truncate.
Fixes https://github.com/llvm/llvm-project/issues/85903
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPlatformPythonInterface/ScriptedPlatformPythonInterface.cpp')
0 files changed, 0 insertions, 0 deletions
