getParent() ^ 3 == getModule() ; NFCI
[oota-llvm.git] / lib / Transforms / Scalar / LoopIdiomRecognize.cpp
index 9dc41ba2f3281e979b8ccfb952b8fb699929af51..b2cc66852d5db1a1e3de7609b6c8b230f9954eac 100644 (file)
@@ -578,7 +578,7 @@ bool LoopIdiomRecognize::processLoopStridedStore(
     // Everything is emitted in default address space
     Type *Int8PtrTy = DestInt8PtrTy;
 
-    Module *M = TheStore->getParent()->getParent()->getParent();
+    Module *M = TheStore->getModule();
     Value *MSP =
         M->getOrInsertFunction("memset_pattern16", Builder.getVoidTy(),
                                Int8PtrTy, Int8PtrTy, IntPtr, (void *)nullptr);