1 ; RUN: opt -S -loop-unswitch < %s | FileCheck %s
2 ; RUN: opt -S -loop-unswitch -enable-mssa-loop-dependency=true -verify-memoryssa < %s | FileCheck %s
3 target triple = "x86_64-pc-win32"
5 define void @f(i32 %doit, i1 %x, i1 %y) personality i32 (...)* @__CxxFrameHandler3 {
7 %tobool = icmp eq i32 %doit, 0
10 for.cond: ; preds = %for.inc, %entry
11 br i1 %x, label %for.body, label %for.end
13 for.body: ; preds = %for.cond
14 br i1 %tobool, label %if.then, label %for.inc
16 if.then: ; preds = %for.body
17 br i1 %y, label %for.inc, label %delete.notnull
19 delete.notnull: ; preds = %if.then
21 to label %invoke.cont unwind label %lpad
23 invoke.cont: ; preds = %delete.notnull
26 lpad: ; preds = %delete.notnull
27 %cp = cleanuppad within none []
28 cleanupret from %cp unwind to caller
30 for.inc: ; preds = %invoke.cont, %if.then, %for.body
33 for.end: ; preds = %for.cond
39 declare i32 @__CxxFrameHandler3(...)
41 ; CHECK-LABEL: define void @f(
42 ; CHECK: cleanuppad within none []
43 ; CHECK-NOT: cleanuppad
45 attributes #0 = { ssp uwtable }