[PATCH] D143195: ValueTracking: Add start of computeKnownFPClass API
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 9 05:41:30 PST 2023
arsenm added inline comments.
================
Comment at: llvm/include/llvm/Analysis/ValueTracking.h:234
+ else if (SignBit)
+ *SignBit &= *RHS.SignBit;
+
----------------
nikic wrote:
> I don't understand your logic here. If `&` is supposed to be (doc comments?) an intersection, then if one side knows the sign bit and the other doesn't, shouldn't we be using the known sign bit?
>
> It doesn't look like `operator&=` or `commonBits()` is actually used though. It may be worthwhile to split out this class into a separate header (like KnownBits) and unit test it.
If you don't know one of the sign bits you don't know anything. & should only return true if we know both sign bits must be true
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D143195/new/
https://reviews.llvm.org/D143195
More information about the llvm-commits
mailing list