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



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to