diff --git a/polly/lib/Analysis/ScopDetection.cpp b/polly/lib/Analysis/ScopDetection.cpp index c0dba128bebd..ad2409b802db 100644 --- a/polly/lib/Analysis/ScopDetection.cpp +++ b/polly/lib/Analysis/ScopDetection.cpp @@ -994,6 +994,9 @@ bool ScopDetection::isValidInstruction(Instruction &Inst, return false; } + if (isa(&Inst) || isa(&Inst)) + return false; + // We only check the call instruction but not invoke instruction. if (CallInst *CI = dyn_cast(&Inst)) { if (isValidCallInst(*CI, Context))