aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/AutoUpgrade.cpp
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2023-08-11 15:05:36 -0400
committerMatt Arsenault <arsenm2@gmail.com>2023-09-13 08:38:48 +0300
commitedecb6048148b7c22cfe567ccbf2dba5e1000bdc (patch)
treec4eed491dc576e52622254b2ccd6c3ea944ff87d /llvm/lib/IR/AutoUpgrade.cpp
parent00061843bd93b7dd9f83e1448e569e193c22ccf8 (diff)
downloadllvm-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/IR/AutoUpgrade.cpp')
-rw-r--r--llvm/lib/IR/AutoUpgrade.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/IR/AutoUpgrade.cpp b/llvm/lib/IR/AutoUpgrade.cpp
index 4e10c6c..eedde64 100644
--- a/llvm/lib/IR/AutoUpgrade.cpp
+++ b/llvm/lib/IR/AutoUpgrade.cpp
@@ -926,6 +926,14 @@ static bool UpgradeIntrinsicFunction1(Function *F, Function *&NewFn) {
NewFn = nullptr;
return true;
}
+
+ if (Name.startswith("ldexp.")) {
+ // Target specific intrinsic became redundant
+ NewFn = Intrinsic::getDeclaration(
+ F->getParent(), Intrinsic::ldexp,
+ {F->getReturnType(), F->getArg(1)->getType()});
+ return true;
+ }
}
break;