[PATCH] D150100: [KnownBits] Improve implementation of `KnownBits::abs`
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 8 03:44:51 PDT 2023
nikic added inline comments.
================
Comment at: llvm/lib/Support/KnownBits.cpp:423
+ KnownBits KnownNeg = computeForAddSub(
+ /*Add*/ false, /*NSW*/ false, Zero, *this);
+
----------------
You can pass IntMinIsPoison to the NSW argument.
================
Comment at: llvm/lib/Support/KnownBits.cpp:426
+ // NB: KnownAbs is not always a subset of KnownNeg so we want to get input
+ // from both.
+ KnownAbs.One |= KnownNeg.One;
----------------
Under which circumstance is KnownAbs better? Seems fishy.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150100/new/
https://reviews.llvm.org/D150100
More information about the llvm-commits
mailing list