diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2023-08-11 15:05:36 -0400 |
---|---|---|
committer | Matt Arsenault <arsenm2@gmail.com> | 2023-09-13 08:38:48 +0300 |
commit | edecb6048148b7c22cfe567ccbf2dba5e1000bdc (patch) | |
tree | c4eed491dc576e52622254b2ccd6c3ea944ff87d /llvm/lib/Analysis/ConstantFolding.cpp | |
parent | 00061843bd93b7dd9f83e1448e569e193c22ccf8 (diff) | |
download | llvm-edecb6048148b7c22cfe567ccbf2dba5e1000bdc.zip llvm-edecb6048148b7c22cfe567ccbf2dba5e1000bdc.tar.gz llvm-edecb6048148b7c22cfe567ccbf2dba5e1000bdc.tar.bz2 |
Reapply "AMDGPU: Drop and auto-upgrade llvm.amdgcn.ldexp to llvm.ldexp"
This reverts commit d9333e360a7c52587ab6e4328e7493b357fb2cf3.
Diffstat (limited to 'llvm/lib/Analysis/ConstantFolding.cpp')
-rw-r--r-- | llvm/lib/Analysis/ConstantFolding.cpp | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/llvm/lib/Analysis/ConstantFolding.cpp b/llvm/lib/Analysis/ConstantFolding.cpp index f12a5dd..e08d991 100644 --- a/llvm/lib/Analysis/ConstantFolding.cpp +++ b/llvm/lib/Analysis/ConstantFolding.cpp @@ -1564,7 +1564,6 @@ bool llvm::canConstantFoldCallTo(const CallBase *Call, const Function *F) { case Intrinsic::amdgcn_fmul_legacy: case Intrinsic::amdgcn_fma_legacy: case Intrinsic::amdgcn_fract: - case Intrinsic::amdgcn_ldexp: case Intrinsic::amdgcn_sin: // The intrinsics below depend on rounding mode in MXCSR. case Intrinsic::x86_sse_cvtss2si: @@ -2669,16 +2668,6 @@ static Constant *ConstantFoldScalarCall2(StringRef Name, Ty->getContext(), APFloat((double)std::pow(Op1V.convertToDouble(), (int)Op2C->getZExtValue()))); - - if (IntrinsicID == Intrinsic::amdgcn_ldexp) { - // FIXME: Should flush denorms depending on FP mode, but that's ignored - // everywhere else. - - // scalbn is equivalent to ldexp with float radix 2 - APFloat Result = scalbn(Op1->getValueAPF(), Op2C->getSExtValue(), - APFloat::rmNearestTiesToEven); - return ConstantFP::get(Ty->getContext(), Result); - } } return nullptr; } |