aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectPlatform.cpp
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2023-06-19 14:21:40 +0200
committerNikita Popov <npopov@redhat.com>2023-06-27 09:40:09 +0200
commitc31eb827b72da784d7f18512a51e5396ac302d72 (patch)
tree327ae99d96b13564ce66d285a124fbf995ce9f9e /lldb/source/Commands/CommandObjectPlatform.cpp
parent51b0398b76fae2b85b9eec440c7ed63908bf30f3 (diff)
downloadllvm-c31eb827b72da784d7f18512a51e5396ac302d72.zip
llvm-c31eb827b72da784d7f18512a51e5396ac302d72.tar.gz
llvm-c31eb827b72da784d7f18512a51e5396ac302d72.tar.bz2
[BasicAA] Fix nsw handling for negated scales (PR63266)
We currently preserve the nsw flag when negating scales, which is incorrect for INT_MIN. However, just dropping the NSW flag in this case makes BasicAA behavior unreliable and asymmetric, because we may or may not drop the NSW flag depending on which side gets subtracted. Instead, leave the Scale alone and add an additional IsNegated flag, which indicates that the whole VarIndex should be interpreted as a subtraction. This allows us to retain the NSW flag. When accumulating the offset range, we need to use subtraction instead of adding for IsNegated indices. Everything else works on the absolute value of the scale, so the negation does not matter there. Fixes https://github.com/llvm/llvm-project/issues/63266. Differential Revision: https://reviews.llvm.org/D153270
Diffstat (limited to 'lldb/source/Commands/CommandObjectPlatform.cpp')
0 files changed, 0 insertions, 0 deletions