[PATCH] D34566: [loop idiom Recognition] support memcpy for multiple consecutive loads and stores

Haicheng Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 25 11:42:34 PDT 2017


haicheng added inline comments.


================
Comment at: lib/Transforms/Scalar/LoopIdiomRecognize.cpp:930
+
+    LoadInst *FirstStoreLoad = dyn_cast<LoadInst>(SL[i]->getValueOperand());
+    assert(FirstStoreLoad->isUnordered() && 
----------------
haicheng wrote:
> What if FirstStoreLoad is nullptr?
Then you can use cast instead of dyn_cast


https://reviews.llvm.org/D34566





More information about the llvm-commits mailing list