[PATCH] D127964: [DCE] Eliminate no-op atan and atan2 calls

Mohammed Nurul Hoque via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 16 07:26:08 PDT 2022


mohammed-nurulhoque created this revision.
Herald added a subscriber: hiraditya.
Herald added a project: All.
mohammed-nurulhoque requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

>From the opengroup specifications, atan2 fails if the result underflows and atan fails if the argument is subnormal.
In other cases we can eliminate the call to atan/atan2.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D127964

Files:
  llvm/lib/Analysis/ConstantFolding.cpp
  llvm/test/Transforms/InstCombine/elimAtan.ll
  llvm/test/Transforms/InstSimplify/ConstProp/math-1.ll
  llvm/test/Transforms/InstSimplify/ConstProp/math-2.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127964.437531.patch
Type: text/x-patch
Size: 5503 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220616/c70675da/attachment.bin>


More information about the llvm-commits mailing list