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

Hendrik Greving via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 22 09:35:08 PDT 2022


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG510a2bbda4ed: [IR] Allow matching pointer to vector with opaque pointers. (authored by hgreving).

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.417323.patch
Type: text/x-patch
Size: 870 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220322/2329e6b2/attachment.bin>


More information about the llvm-commits mailing list