[llvm] [InstCombine] Fold isnan idioms (PR #101510)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 1 10:10:28 PDT 2024
================
@@ -339,8 +339,8 @@ static Value *foldLogOpOfMaskedICmps_NotAllZeros_BMask_Mixed(
//
// We currently handle the case of B, C, D, E are constant.
//
- const APInt *BCst, *CCst, *DCst, *OrigECst;
- if (!match(B, m_APInt(BCst)) || !match(C, m_APInt(CCst)) ||
+ const APInt *BCst, *DCst, *OrigECst;
+ if (!match(B, m_APInt(BCst)) || !match(C, m_Zero()) ||
----------------
dtcxzyw wrote:
`icmp eq (Pow2 & B), Pow2` can be canonicalized into `icmp ne (Pow2 & B), 0`. I think it is ok to remove the unused parameter `C`.
https://github.com/llvm/llvm-project/pull/101510
More information about the llvm-commits
mailing list