[PATCH] D103169: [FPEnv][InstSimplify] Constrained FP support for NaN
Kevin P. Neal via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 18 14:37:13 PDT 2021
kpn added inline comments.
================
Comment at: llvm/lib/Analysis/InstructionSimplify.cpp:5049-5050
- if (Constant *C = simplifyFPOp({Op0, Op1}, FMF, Q))
- return C;
+ if (!IsDefaultFPEnvironment(ExBehavior, Rounding))
+ return nullptr;
----------------
spatel wrote:
> This and similar changes are opening the door to every existing FP fold. That seems safe enough given that we're in the default environment, but there are no tests for this unless I've missed it?
>
> Can we make that a small follow-on patch with some test coverage that includes FMF, so we know it's all getting piped through as expected.
You want some tests to verify that the below folds work correctly when given constrained intrinsics with FMF? I think that's what you are asking. Since we have no tests for that currently, yes, we can do that. Unless I misunderstood?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103169/new/
https://reviews.llvm.org/D103169
More information about the llvm-commits
mailing list