[PATCH] D55262: [OpenCL] Fix for TBAA information of pointer after addresspacecast

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 5 07:50:30 PST 2018


rjmccall added a comment.

The code was dropping all the original l-value information, which includes alignment.  So if you start with an l-value that refers to under-aligned memory (or over-aligned), we were losing that information on the resulting l-value.  The test case would be something like:

  struct __attribute__((packed)) A { int x; };
  int test(__global A *a) {
    return static_cast<__generic A &>(*a).x; // this load should have alignment 1
  }


Repository:
  rC Clang

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

https://reviews.llvm.org/D55262





More information about the cfe-commits mailing list