[llvm] [InstCombine] Fold `fcmp (fmul X, C1), C2` to `fcmp X, C2/C1` (PR #205003)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 23 00:09:57 PDT 2026


================

----------------
VachanVY wrote:

Do you mean:
1. change `match(C, m_AnyZeroFP())` to `C->isZero()`
2. So I should filter half type and allow denormals, i.e ieee format?
```cpp
Type* FPTy = LHSI->getType()->getScalarType();
if (FPTy->isHalfTy() || I.getFunction()->getDenormalMode(FPTy->getFltSemantics()) != DenormalMode::getIEEE())
  return nullptr;
```
cc: @dtcxzyw 

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


More information about the llvm-commits mailing list