[PATCH] D38392: Disallow sinking of unordered atomic loads into loops

Dehao Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 29 09:20:28 PDT 2017


danielcdh added a comment.

How about the following case:

while(c1) {
 if (c2)

  atomic_load;

}

Looks like isSafeToExecuteUnconditionally will not prevent the atomic_load from hoisted to preheader. So in real execution, it may introduce extra atomic loads?


https://reviews.llvm.org/D38392





More information about the llvm-commits mailing list