[llvm] [InstCombine] Resolve incorrect submasking in foldIntrinsicIsFPClass (PR #190504)

Hardik Gupta via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 5 09:58:29 PDT 2026


================
@@ -1180,7 +1180,7 @@ Instruction *InstCombinerImpl::foldIntrinsicIsFPClass(IntrinsicInst &II) {
   // If none of the tests which can return false are possible, fold to true.
   // fp_class (nnan x), ~(qnan|snan) -> true
   // fp_class (ninf x), ~(ninf|pinf) -> true
-  if (Mask == Known.KnownFPClasses)
+  if ((Known.KnownFPClasses & ~Mask) == fcNone)
----------------
hardikkgupta wrote:

Added!

https://github.com/llvm/llvm-project/pull/190504


More information about the llvm-commits mailing list