[PATCH] D85522: [Loads] Globals are dereferenceable, if offset + size <= sizeof(global).

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 7 12:37:36 PDT 2020


fhahn abandoned this revision.
fhahn added a comment.

In D85522#2203414 <https://reviews.llvm.org/D85522#2203414>, @efriedma wrote:

> I'm not sure I understand why you need a special case here.  I think getPointerDereferenceableBytes() and isAligned() should handle global variables without any additional help.
>
> If this does make a difference, it should be possible to write a testcase using LICM or something like that.

You are right, this is already handled, I was just using `isDereferenceablePointer` with the wrong type, which was why it didn't work initially. Sorry for the noise, this seems not needed after all!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85522



More information about the llvm-commits mailing list