aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Function.cpp
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2021-07-01 20:32:10 +0200
committerNikita Popov <nikita.ppv@gmail.com>2021-07-01 20:35:33 +0200
commit460dfbd9f83f1178ee754e2734322ddacbd707f3 (patch)
tree902a2705e6d5e9541048e9f3df10dfc6fd1fb6d4 /llvm/lib/IR/Function.cpp
parent83887df15597990308e9903d0480fa7676d772a1 (diff)
downloadllvm-460dfbd9f83f1178ee754e2734322ddacbd707f3.zip
llvm-460dfbd9f83f1178ee754e2734322ddacbd707f3.tar.gz
llvm-460dfbd9f83f1178ee754e2734322ddacbd707f3.tar.bz2
[OpaquePtr] Support VecOfAnyPtrsToElt intrinsics
In this case the pointer type is part of the mangled name, so we can allow on opaque pointer outside --force-opaque-pointers mode as well.
Diffstat (limited to 'llvm/lib/IR/Function.cpp')
-rw-r--r--llvm/lib/IR/Function.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/IR/Function.cpp b/llvm/lib/IR/Function.cpp
index 8f096f0..b502e5c 100644
--- a/llvm/lib/IR/Function.cpp
+++ b/llvm/lib/IR/Function.cpp
@@ -1566,7 +1566,8 @@ static bool matchIntrinsicType(
dyn_cast<PointerType>(ThisArgVecTy->getElementType());
if (!ThisArgEltTy)
return true;
- return ThisArgEltTy->getElementType() != ReferenceType->getElementType();
+ return !ThisArgEltTy->isOpaqueOrPointeeTypeMatches(
+ ReferenceType->getElementType());
}
case IITDescriptor::VecElementArgument: {
if (D.getArgumentNumber() >= ArgTys.size())