[llvm] [InstCombine] Resolve incorrect submasking in foldIntrinsicIsFPClass (PR #190504)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 5 08:45:32 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)
----------------
dtcxzyw wrote:
Please add a test to demonstrate the issue. See also https://llvm.org/docs/InstCombineContributorGuide.html#precommit-tests.
https://github.com/llvm/llvm-project/pull/190504
More information about the llvm-commits
mailing list