[PATCH] D122203: [IR] Allow matching vector pointer with opaque pointers.

Hendrik Greving via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 22 07:33:31 PDT 2022


hgreving updated this revision to Diff 417294.
hgreving retitled this revision from "[IR] Allow skipping vector pointer type." to "[IR] Allow matching vector pointer with opaque pointers.".
hgreving edited the summary of this revision.

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D122203/new/

https://reviews.llvm.org/D122203

Files:
  llvm/lib/IR/Function.cpp


Index: llvm/lib/IR/Function.cpp
===================================================================
--- llvm/lib/IR/Function.cpp
+++ llvm/lib/IR/Function.cpp
@@ -1468,7 +1468,11 @@
         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;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122203.417294.patch
Type: text/x-patch
Size: 870 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220322/4cd6356c/attachment.bin>


More information about the llvm-commits mailing list