[llvm] [InstCombine] Fold isnan idioms (PR #101510)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 1 10:23:17 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()) ||
----------------
goldsteinn wrote:
Yeah, if we are potentially handling `icmp eq (Pow2 & B), Pow2` form of `ic.p ne (Pow2 & B), 0` (which agreed is fine) we shouldn't add an assert/
https://github.com/llvm/llvm-project/pull/101510
More information about the llvm-commits
mailing list