[llvm] [InstCombine] Generalize ignoreSignBitOfZero/NaN to handle more cases (PR #141015)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu May 22 07:54:52 PDT 2025
================
@@ -330,6 +330,13 @@ bool isKnownNeverNaN(const Value *V, unsigned Depth, const SimplifyQuery &SQ);
std::optional<bool> computeKnownFPSignBit(const Value *V, unsigned Depth,
const SimplifyQuery &SQ);
+/// Return true if the sign bit of result can be ignored when the result is
+/// zero.
----------------
nikic wrote:
I think from a ValueTracking perspective, these APIs should check whether a given `Use &` can ignore the sign bit. The calling code should be responsible for looking at a single use, if that's what it wants to do.
https://github.com/llvm/llvm-project/pull/141015
More information about the llvm-commits
mailing list