[llvm] [ValueTracking] Fix assertion failure when `computeKnownFPClass` returns fcNone (PR #92355)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Thu May 16 00:22:09 PDT 2024
================
@@ -1126,7 +1126,8 @@ static void computeKnownBitsFromOperator(const Operator *I,
KnownFPClass Result = computeKnownFPClass(V, fcAllFlags, Depth + 1, Q);
FPClassTest FPClasses = Result.KnownFPClasses;
- if (Result.isKnownNever(fcNormal | fcSubnormal | fcNan)) {
+ if (FPClasses != fcNone &&
----------------
dtcxzyw wrote:
I think comparing with fcNone explicitly is better.
See https://github.com/llvm/llvm-project/blob/8389177710c2cb7a7e0cf5c6c9b34aabb8048f39/llvm/lib/Analysis/ValueTracking.cpp#L5007-L5008
https://github.com/llvm/llvm-project/blob/8389177710c2cb7a7e0cf5c6c9b34aabb8048f39/llvm/lib/Analysis/ValueTracking.cpp#L5174-L5178
https://github.com/llvm/llvm-project/blob/8389177710c2cb7a7e0cf5c6c9b34aabb8048f39/llvm/lib/Analysis/ValueTracking.cpp#L4199
https://github.com/llvm/llvm-project/pull/92355
More information about the llvm-commits
mailing list