diff options
author | Kevin P. Neal <kevin.neal@sas.com> | 2019-08-28 16:33:36 +0000 |
---|---|---|
committer | Kevin P. Neal <kevin.neal@sas.com> | 2019-08-28 16:33:36 +0000 |
commit | ddf13c00edf146ba0436af2b749039fc74783e00 (patch) | |
tree | 5db9b2f7cbccf417d76d67caff46412716c42168 /llvm/lib/CodeGen/TargetLoweringBase.cpp | |
parent | f48ebacfcc94a358272b8ec9e99bc65294647401 (diff) | |
download | llvm-ddf13c00edf146ba0436af2b749039fc74783e00.zip llvm-ddf13c00edf146ba0436af2b749039fc74783e00.tar.gz llvm-ddf13c00edf146ba0436af2b749039fc74783e00.tar.bz2 |
[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
llvm-svn: 370228
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringBase.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetLoweringBase.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringBase.cpp b/llvm/lib/CodeGen/TargetLoweringBase.cpp index 40ecef58..dcedca7 100644 --- a/llvm/lib/CodeGen/TargetLoweringBase.cpp +++ b/llvm/lib/CodeGen/TargetLoweringBase.cpp @@ -716,6 +716,8 @@ void TargetLoweringBase::initActions() { setOperationAction(ISD::STRICT_FMINNUM, VT, Expand); setOperationAction(ISD::STRICT_FP_ROUND, VT, Expand); setOperationAction(ISD::STRICT_FP_EXTEND, VT, Expand); + setOperationAction(ISD::STRICT_FP_TO_SINT, VT, Expand); + setOperationAction(ISD::STRICT_FP_TO_UINT, VT, Expand); // For most targets @llvm.get.dynamic.area.offset just returns 0. setOperationAction(ISD::GET_DYNAMIC_AREA_OFFSET, VT, Expand); |