summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
diff options
context:
space:
mode:
authorFlorian Hahn <flo@fhahn.com>2024-09-04 20:50:05 +0100
committerFlorian Hahn <flo@fhahn.com>2024-09-04 20:50:06 +0100
commit3fe6a064f15cd854fd497594cc20e8b680cd2133 (patch)
tree6b28282d281570c538ecfebb620730fb8f703e84 /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
parent34f2c9a9ce73a61b27d75dab7e1eed256491afcc (diff)
[LV] Check if compare is truncated directly in getInstructionCost.
The current check for truncated compares in getInstructionCost misses cases where either the first or both operands are constants. Check directly if the compare is marked for truncation. In that case, the minimum bitwidth is that of the operands. The patch also adds asserts to ensure that. This fixes a divergence between legacy and VPlan-based cost model, where the legacy cost model incorrectly estimated the cost of compares with truncated operands. Fixes https://github.com/llvm/llvm-project/issues/107171.
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp')
0 files changed, 0 insertions, 0 deletions