[PATCH] D107285: [FPEnv][InstSimplify] Enable more folds for constrained fsub
Serge Pavlov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 2 11:03:26 PDT 2021
sepavloff added inline comments.
================
Comment at: llvm/lib/Analysis/InstructionSimplify.cpp:4963
// fsub X, +0 ==> X
- if (match(Op1, m_PosZeroFP()))
- return Op0;
+ if (ExBehavior != fp::ebStrict || FMF.noNaNs())
+ if (match(Op1, m_PosZeroFP()))
----------------
This transformation is valid only if `FMF.noNaNs()` is set, because it is incorrect if `X==SNaN`. Similar for other cases below.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107285/new/
https://reviews.llvm.org/D107285
More information about the llvm-commits
mailing list