[FPEnv][InstSimplify] Constrained FP support for NaN
authorKevin P. Neal <kevin.neal@sas.com>
Thu, 8 Jul 2021 19:12:11 +0000 (15:12 -0400)
committerKevin P. Neal <kevin.neal@sas.com>
Fri, 9 Jul 2021 15:26:28 +0000 (11:26 -0400)
commit52900486a1b5d270687b7268dc8dd90061889066
treed92761830ee022d0906778f26b3b3dbb7fca0c30
parent841077a7e9806f6b288c93dca86dc141cbf5a01d
[FPEnv][InstSimplify] Constrained FP support for NaN

Currently InstructionSimplify.cpp knows how to simplify floating point
instructions that have a NaN operand. It does not know how to handle the
matching constrained FP intrinsic.

This patch teaches it how to simplify so long as the exception handling
is not "fpexcept.strict".

Differential Revision: https://reviews.llvm.org/D103169
llvm/include/llvm/Analysis/InstructionSimplify.h
llvm/include/llvm/IR/FPEnv.h
llvm/lib/Analysis/InstructionSimplify.cpp
llvm/lib/Transforms/Utils/Local.cpp
llvm/test/Transforms/InstSimplify/X86/fp-nan-strictfp.ll
llvm/test/Transforms/InstSimplify/fast-math-strictfp.ll [new file with mode: 0644]
llvm/test/Transforms/InstSimplify/fdiv-strictfp.ll [new file with mode: 0644]
llvm/test/Transforms/InstSimplify/floating-point-arithmetic-strictfp.ll [new file with mode: 0644]
llvm/test/Transforms/InstSimplify/fp-undef-poison-strictfp.ll