brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · 85ed6f5 Raw
49 lines · plain
1; RUN: opt < %s -loop-reduce -S | FileCheck %s2target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"3target triple = "x86_64-pc-windows-msvc"4 5define void @f() personality ptr @__CxxFrameHandler3 {6entry:7  br label %for.cond.i8 9for.cond.i:                                       ; preds = %for.inc.i, %entry10  %_First.addr.0.i = phi ptr [ null, %entry ], [ %incdec.ptr.i, %for.inc.i ]11  invoke void @g()12          to label %for.inc.i unwind label %catch.dispatch.i13 14catch.dispatch.i:                                 ; preds = %for.cond.i15  %cs = catchswitch within none [label %for.cond.1.preheader.i] unwind to caller16 17for.cond.1.preheader.i:                           ; preds = %catch.dispatch.i18  %0 = catchpad within %cs [ptr null, i32 64, ptr null]19  %cmp.i = icmp eq ptr %_First.addr.0.i, null20  br label %for.cond.1.i21 22for.cond.1.i:                                     ; preds = %for.body.i, %for.cond.1.preheader.i23  br i1 %cmp.i, label %for.end.i, label %for.body.i24 25for.body.i:                                       ; preds = %for.cond.1.i26  call void @g()27  br label %for.cond.1.i28 29for.inc.i:                                        ; preds = %for.cond.i30  %incdec.ptr.i = getelementptr inbounds i32, ptr %_First.addr.0.i, i64 131  br label %for.cond.i32 33for.end.i:                                        ; preds = %for.cond.1.i34  catchret from %0 to label %leave35 36leave:                                            ; preds = %for.end.i37  ret void38}39 40; CHECK-LABEL: define void @f(41; CHECK: %[[PHI:.*]]  = phi i64 [ %[[IV_NEXT:.*]], {{.*}} ], [ 0, {{.*}} ]42; CHECK: %[[ITOP:.*]] = inttoptr i64 %[[PHI]] to ptr43; CHECK: %[[CMP:.*]]  = icmp eq ptr %[[ITOP]], null44; CHECK: %[[IV_NEXT]] = add i64 %[[PHI]], -445 46declare void @g()47 48declare i32 @__CxxFrameHandler3(...)49