[llvm-dev] Opaque pointers and GEP

Arthur Eubanks via llvm-dev llvm-dev at lists.llvm.org
Fri Jun 11 11:02:42 PDT 2021


I think that makes sense, that's just something that hasn't been visited
yet. Feel free to send out a patch if you'd like, else I'll get around to
it at some point.

On Fri, Jun 11, 2021 at 6:53 AM David Lloyd via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> I was experimenting on godbolt with opaque pointers and I noticed that
> while GEP with an opaque pointer type seems to work exactly as I would
> expect, it returns a non-opaque pointer type.
>
> Would it not make sense for GEP to return `ptr` when its basis pointer
> is a `ptr`, at least when thinking about how a migration would work?
>
> Here's an example: https://godbolt.org/z/3sWGbdKdx - the left compiler
> is happy with a `bitcast` but the right one is angry without.
>
> --
> - DML • he/him
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210611/0e2027bb/attachment.html>


More information about the llvm-dev mailing list