[PATCH] D116934: [flang] Add better invalid argument warnings when folding with host runtime

Jean Perier via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 10 05:52:15 PST 2022


jeanPerier created this revision.
jeanPerier added reviewers: klausler, sscalpone.
jeanPerier added a project: Flang.
Herald added a subscriber: jdoerfert.
jeanPerier requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Currently, folding was emitting "invalid argument on intrinsic function"
when folding numerical intrinsics with the host runtime like `acos(200.)`.

Add a way to register custom argument checks before folding with the
host runtime. If this checks emit warnings, the default message (that
came from the capture of floating point signals from the math library
call) is skipped.

Arguments range/value checks are added for acos, asin, atan2, mod,
gamma, log_gamma, bessel_y0, bessel_y1, and the elemental bessel_yn.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D116934

Files:
  flang/lib/Evaluate/host.cpp
  flang/lib/Evaluate/intrinsics-library.cpp
  flang/test/Evaluate/folding04.f90

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116934.398598.patch
Type: text/x-patch
Size: 13027 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220110/58cbb78b/attachment.bin>


More information about the llvm-commits mailing list