[PATCH] D32319: Add constrained intrinsics for some libm-equivalent operations

Andy Kaylor via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 20 15:54:18 PDT 2017


andrew.w.kaylor created this revision.

This patch adds constrained versions of some libm-equivalent floating point operations for which non-constrained intrinsics currently exist.

The purpose of the constrained intrinsics is to force the optimizer to respect the restrictions that will be necessary to support things like the STDC FENV_ACCESS ON pragma without interfering with optimizations when these restrictions are not needed.  This is a follow-up to https://reviews.llvm.org/D27028.

There are additional libm-equivalent operations which may need to be handled in a future patch.  In addition, it will be necessary to update the direct manipulation of libm function calls to prevent unwanted optimizations when FP environment access is enabled.


Repository:
  rL LLVM

https://reviews.llvm.org/D32319

Files:
  docs/LangRef.rst
  include/llvm/CodeGen/ISDOpcodes.h
  include/llvm/CodeGen/SelectionDAG.h
  include/llvm/CodeGen/SelectionDAGNodes.h
  include/llvm/IR/IntrinsicInst.h
  include/llvm/IR/Intrinsics.td
  lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
  lib/CodeGen/SelectionDAG/SelectionDAG.cpp
  lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
  lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
  lib/IR/IntrinsicInst.cpp
  lib/IR/Verifier.cpp
  test/CodeGen/X86/fp-intrinsics.ll
  test/Feature/fp-intrinsics.ll
  test/Verifier/fp-intrinsics.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32319.96040.patch
Type: text/x-patch
Size: 59694 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170420/e2450b69/attachment.bin>


More information about the llvm-commits mailing list