Skip to content

Commit

Permalink
[IR] Allow matching pointer to vector with opaque pointers.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Hendrik Greving committed Mar 22, 2022
1 parent ef9cf86 commit 510a2bb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion llvm/lib/IR/Function.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit 510a2bb

Please sign in to comment.