aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/AutoUpgrade.cpp
diff options
context:
space:
mode:
authorBradley Smith <bradley.smith@arm.com>2022-06-16 14:45:28 +0000
committerBradley Smith <bradley.smith@arm.com>2022-06-27 10:48:45 +0000
commita83aa33d1bf9e8fe4858391f95a27ffd022e465b (patch)
tree57e81643a96c35fc06025c7c8e946fb98aad876a /llvm/lib/IR/AutoUpgrade.cpp
parent0b998053db7c75c0427860d3947386013d2762ed (diff)
downloadllvm-a83aa33d1bf9e8fe4858391f95a27ffd022e465b.zip
llvm-a83aa33d1bf9e8fe4858391f95a27ffd022e465b.tar.gz
llvm-a83aa33d1bf9e8fe4858391f95a27ffd022e465b.tar.bz2
[IR] Move vector.insert/vector.extract out of experimental namespace
These intrinsics are now fundemental for SVE code generation and have been present for a year and a half, hence move them out of the experimental namespace. Differential Revision: https://reviews.llvm.org/D127976
Diffstat (limited to 'llvm/lib/IR/AutoUpgrade.cpp')
-rw-r--r--llvm/lib/IR/AutoUpgrade.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/llvm/lib/IR/AutoUpgrade.cpp b/llvm/lib/IR/AutoUpgrade.cpp
index 622bf54..2a4c315 100644
--- a/llvm/lib/IR/AutoUpgrade.cpp
+++ b/llvm/lib/IR/AutoUpgrade.cpp
@@ -748,6 +748,23 @@ static bool UpgradeIntrinsicFunction1(Function *F, Function *&NewFn) {
break;
}
case 'e': {
+ if (Name.startswith("experimental.vector.extract.")) {
+ rename(F);
+ Type *Tys[] = {F->getReturnType(), F->arg_begin()->getType()};
+ NewFn = Intrinsic::getDeclaration(F->getParent(),
+ Intrinsic::vector_extract, Tys);
+ return true;
+ }
+
+ if (Name.startswith("experimental.vector.insert.")) {
+ rename(F);
+ auto Args = F->getFunctionType()->params();
+ Type *Tys[] = {Args[0], Args[1]};
+ NewFn = Intrinsic::getDeclaration(F->getParent(),
+ Intrinsic::vector_insert, Tys);
+ return true;
+ }
+
SmallVector<StringRef, 2> Groups;
static const Regex R("^experimental.vector.reduce.([a-z]+)\\.[a-z][0-9]+");
if (R.match(Name, &Groups)) {