[PATCH] D40613: [LoopIdiom] Recognize unordered atomic memset

Anna Thomas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 1 11:21:11 PST 2017


anna added inline comments.


================
Comment at: lib/Transforms/Scalar/LoopIdiomRecognize.cpp:923
+    const auto *SI = dyn_cast<StoreInst>(TheStore);
+    if (!(SI && SI->isAtomic()))
+      NewCall =
----------------
Why do we not check that the "ordinary memset" was substituting a store?
In other words, shouldn't there be a check for `SI`

This is the behaviour before your change as well (we dont check for store), but somehow it struck me as weird. 


https://reviews.llvm.org/D40613





More information about the llvm-commits mailing list