[PATCH] D103169: [FPEnv][InstSimplify] Constrained FP support for undef, poison, and NaN

Kevin P. Neal via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 26 07:50:30 PDT 2021


kpn created this revision.
kpn added reviewers: craig.topper, andrew.w.kaylor, sepavloff, spatel, lebedev.ri, nlopes.
Herald added a subscriber: hiraditya.
kpn requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Currently InstructionSimplify.cpp knows how to simplify floating point instructions that have an undef, a poison, or 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".

It is not 100% clear to me that this is correct handling of undef and poison, but that's what reviews are for.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D103169

Files:
  llvm/include/llvm/Analysis/InstructionSimplify.h
  llvm/lib/Analysis/InstructionSimplify.cpp
  llvm/lib/Transforms/Utils/Local.cpp
  llvm/test/Transforms/InstSimplify/fp-undef-poison-strictfp.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103169.347959.patch
Type: text/x-patch
Size: 53341 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210526/4e99c942/attachment.bin>


More information about the llvm-commits mailing list