ScopDetection: Fix mix-up of isLoad and isStore.
authorMichael Kruse <llvm@meinersbur.de>
Fri, 26 Feb 2016 16:40:35 +0000 (16:40 +0000)
committerMichael Kruse <llvm@meinersbur.de>
Fri, 26 Feb 2016 16:40:35 +0000 (16:40 +0000)
This was accidentally introduced in r258947.

Thanks to Hongbin Zheng for finding this.

Found-by: etherzhhb
llvm-svn: 262032

polly/lib/Analysis/ScopDetection.cpp

index 2046a90..c4484bb 100644 (file)
@@ -980,8 +980,8 @@ bool ScopDetection::isValidInstruction(Instruction &Inst,
 
   // Check the access function.
   if (auto MemInst = MemAccInst::dyn_cast(Inst)) {
-    Context.hasStores |= MemInst.isLoad();
-    Context.hasLoads |= MemInst.isStore();
+    Context.hasStores |= MemInst.isStore();
+    Context.hasLoads |= MemInst.isLoad();
     if (!MemInst.isSimple())
       return invalid<ReportNonSimpleMemoryAccess>(Context, /*Assert=*/true,
                                                   &Inst);