]> granicus.if.org Git - llvm/commit
[FPEnv] Add fptosi and fptoui constrained intrinsics.
authorKevin P. Neal <kevin.neal@sas.com>
Wed, 28 Aug 2019 16:33:36 +0000 (16:33 +0000)
committerKevin P. Neal <kevin.neal@sas.com>
Wed, 28 Aug 2019 16:33:36 +0000 (16:33 +0000)
commitdda5f16734764466813c957132e7d3eeb69cee6a
treebc1570e48415e710aac617eb705eba82f35818e8
parent9a44f0bdc863f307ccf48762fe75c125b19e0ba3
[FPEnv] Add fptosi and fptoui constrained intrinsics.

This implements constrained floating point intrinsics for FP to signed and
unsigned integers.

Quoting from D32319:
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.

Reviewed by: Andrew Kaylor, Craig Topper, Hal Finkel, Cameron McInally, Roman Lebedev, Kit Barton
Approved by: Craig Topper
Differential Revision: http://reviews.llvm.org/D63782

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370228 91177308-0d34-0410-b5e6-96231b3b80d8
22 files changed:
docs/LangRef.rst
include/llvm/CodeGen/ISDOpcodes.h
include/llvm/CodeGen/SelectionDAGNodes.h
include/llvm/CodeGen/TargetLowering.h
include/llvm/IR/IntrinsicInst.h
include/llvm/IR/Intrinsics.td
lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
lib/CodeGen/SelectionDAG/LegalizeTypes.h
lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp
lib/CodeGen/SelectionDAG/TargetLowering.cpp
lib/CodeGen/TargetLoweringBase.cpp
lib/IR/IntrinsicInst.cpp
lib/IR/Verifier.cpp
test/CodeGen/PowerPC/fp-intrinsics-fptosi-legal.ll [new file with mode: 0644]
test/CodeGen/X86/fp-intrinsics.ll
test/CodeGen/X86/vector-constrained-fp-intrinsics.ll
test/Feature/fp-intrinsics.ll