jfb added a comment. lgtm Interesting: the current code can't see through an inttoptr + cmpxchg which captures the pointer? It assumes it's captured as soon as the inttoptr occurs? http://reviews.llvm.org/D17400