[PATCH] D28147: [LICM] Allow promotion of some stores that are not guaranteed to execute
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 3 12:27:16 PST 2017
efriedma added inline comments.
================
Comment at: test/Transforms/LICM/scalar_promote.ll:222
+ ret i32 %ret
+}
+
----------------
I'm pretty sure this transform is wrong. For example, `@capture` could create a mutex protecting `%local`, and lock it. Then `@opaque` could release the mutex, does some work, and lock the mutex. In that case, the value stored by `store i32 %x2, i32* %local` is visible to other threads in each iteration, so you can't sink the store out of the loop.
https://reviews.llvm.org/D28147
More information about the llvm-commits
mailing list