diff options
author | Hendrik Greving <hgreving@google.com> | 2022-03-21 19:20:53 -0700 |
---|---|---|
committer | Hendrik Greving <hgreving@google.com> | 2022-03-22 09:34:48 -0700 |
commit | 510a2bbda4edd67e95d8797e748357fc9ceee484 (patch) | |
tree | e2c5abb5d3a81c7574c7e61d0b91b177b7d3b5f4 /llvm/lib/IR/Function.cpp | |
parent | ef9cf86eb0ded6f5460f5870bcb90530a7411a60 (diff) | |
download | llvm-510a2bbda4edd67e95d8797e748357fc9ceee484.zip llvm-510a2bbda4edd67e95d8797e748357fc9ceee484.tar.gz llvm-510a2bbda4edd67e95d8797e748357fc9ceee484.tar.bz2 |
[IR] Allow matching pointer to vector with opaque pointers.
Allows for skipping the pointer to vector type if opaque pointers
are enabled and the matching pointer is a vector pointer when
matching an intrinsic signature in the verifier.
No test added since lacking a target using intrinsic with pointer
to vector arguments.
Differential Revision: https://reviews.llvm.org/D122203
Diffstat (limited to 'llvm/lib/IR/Function.cpp')
-rw-r--r-- | llvm/lib/IR/Function.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/IR/Function.cpp b/llvm/lib/IR/Function.cpp index fa0fd5e..fcc0ef04 100644 --- a/llvm/lib/IR/Function.cpp +++ b/llvm/lib/IR/Function.cpp @@ -1468,7 +1468,11 @@ static bool matchIntrinsicType( return matchIntrinsicType(PT->getNonOpaquePointerElementType(), Infos, ArgTys, DeferredChecks, IsDeferredCheck); // Consume IIT descriptors relating to the pointer element type. - while (Infos.front().Kind == IITDescriptor::Pointer) + // FIXME: Intrinsic type matching of nested single value types or even + // aggregates doesn't work properly with opaque pointers but hopefully + // doesn't happen in practice. + while (Infos.front().Kind == IITDescriptor::Pointer || + Infos.front().Kind == IITDescriptor::Vector) Infos = Infos.slice(1); Infos = Infos.slice(1); return false; |