[FIX] Do not allow select as a base pointer in the SCoP region
llvm-svn: 265884
diff --git a/polly/lib/Analysis/ScopDetection.cpp b/polly/lib/Analysis/ScopDetection.cpp
index ad2409b..8fe33db 100644
--- a/polly/lib/Analysis/ScopDetection.cpp
+++ b/polly/lib/Analysis/ScopDetection.cpp
@@ -578,6 +578,9 @@
if (I->mayHaveSideEffects())
return false;
+ if (isa<SelectInst>(I))
+ return false;
+
// When Val is a Phi node, it is likely not invariant. We do not check whether
// Phi nodes are actually invariant, we assume that Phi nodes are usually not
// invariant.