aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorRyotaro Kasuga <kasuga.ryotaro@fujitsu.com>2025-10-25 00:42:27 +0900
committerGitHub <noreply@github.com>2025-10-25 00:42:27 +0900
commit30984358ff94f3f71f4ac50ea58f6ab32ccc7c23 (patch)
treec60611983fd474629839ba762eea7e361936e3e9 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parenta1ae9001ebb04a43f15a063663be22b92c3d0eb6 (diff)
downloadllvm-30984358ff94f3f71f4ac50ea58f6ab32ccc7c23.zip
llvm-30984358ff94f3f71f4ac50ea58f6ab32ccc7c23.tar.gz
llvm-30984358ff94f3f71f4ac50ea58f6ab32ccc7c23.tar.bz2
[DA] Fix absolute value calculation (#164967)
This patch fixes the computation of the absolute value for SCEV. Previously, it was calculated as `AbsX = SE->isKnownNonNegative(X) ? X : -X`, which would incorrectly assume that `!isKnownNonNegative` implies `isKnownNegative`. This assumption does not hold in general, for example, when `X` is a `SCEVUnknown` and it can be an arbitrary value. To compute the absolute value properly, we should use ScalarEvolution::getAbsExpr instead. Fix #149977
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions