[PATCH] D16986: [LICM] Don't assert on volatile accesses

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 16 19:46:34 PST 2016


reames added a comment.

In http://reviews.llvm.org/D16986#346579, @mssimpso wrote:

> Ed,
>
> It's not surprising to me that TBAA would produce more precise results (and thus an additional alias set in this case). The essential piece is that, in the test case, it's claiming that the address of b cannot be null, which is correct I think. That allows LICM to remove load2 and change load3 to load from null. The alias set containing null cannot be marked volatile since it doesn't contain any loads or stores. But now null is used by load3, which is volatile. So your original patch sounded like a reasonable solution to me! Hopefully someone more knowledgeable will chime in.


This response hits the nail on the head.  If you have a alias set which is being read from with a volatile load which isn't marked volatile, that's the bug you need to fix.


http://reviews.llvm.org/D16986





More information about the llvm-commits mailing list