brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.1 KiB · 5f082da Raw
79 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt < %s -loop-reduce -S | FileCheck %s3target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"4target triple = "x86_64-pc-windows-msvc18.0.0"5 6%struct.L = type { i8, ptr }7 8declare i32 @__CxxFrameHandler3(...)9 10@GV1 = external global ptr11@GV2 = external global %struct.L12 13define void @b_copy_ctor() personality ptr @__CxxFrameHandler3 {14; CHECK-LABEL: @b_copy_ctor(15; CHECK-NEXT:  entry:16; CHECK-NEXT:    [[TMP0:%.*]] = load ptr, ptr @GV1, align 817; CHECK-NEXT:    br label [[FOR_COND:%.*]]18; CHECK:       for.cond:19; CHECK-NEXT:    [[LSR_IV:%.*]] = phi i64 [ [[LSR_IV_NEXT:%.*]], [[CALL_I_NOEXC:%.*]] ], [ 0, [[ENTRY:%.*]] ]20; CHECK-NEXT:    [[LSR_IV2:%.*]] = inttoptr i64 [[LSR_IV]] to ptr21; CHECK-NEXT:    invoke void @a_copy_ctor()22; CHECK-NEXT:    to label [[CALL_I_NOEXC]] unwind label [[CATCH_DISPATCH:%.*]]23; CHECK:       call.i.noexc:24; CHECK-NEXT:    [[LSR_IV_NEXT]] = add i64 [[LSR_IV]], -1625; CHECK-NEXT:    br label [[FOR_COND]]26; CHECK:       catch.dispatch:27; CHECK-NEXT:    [[TMP2:%.*]] = catchswitch within none [label %catch] unwind to caller28; CHECK:       catch:29; CHECK-NEXT:    [[TMP3:%.*]] = catchpad within [[TMP2]] [ptr null, i32 64, ptr null]30; CHECK-NEXT:    [[CMP16:%.*]] = icmp eq ptr [[LSR_IV2]], null31; CHECK-NEXT:    [[TMP4:%.*]] = mul i64 [[LSR_IV]], -132; CHECK-NEXT:    [[UGLYGEP:%.*]] = getelementptr i8, ptr [[TMP0]], i64 [[TMP4]]33; CHECK-NEXT:    br i1 [[CMP16]], label [[FOR_END:%.*]], label [[FOR_BODY_PREHEADER:%.*]]34; CHECK:       for.body.preheader:35; CHECK-NEXT:    br label [[FOR_BODY:%.*]]36; CHECK:       for.body:37; CHECK-NEXT:    [[CMP:%.*]] = icmp eq ptr [[UGLYGEP]], @GV238; CHECK-NEXT:    br i1 [[CMP]], label [[FOR_END_LOOPEXIT:%.*]], label [[FOR_BODY]]39; CHECK:       for.end.loopexit:40; CHECK-NEXT:    br label [[FOR_END]]41; CHECK:       for.end:42; CHECK-NEXT:    catchret from [[TMP3]] to label [[TRY_CONT:%.*]]43; CHECK:       try.cont:44; CHECK-NEXT:    ret void45;46entry:47  %0 = load ptr, ptr @GV1, align 848  br label %for.cond49 50for.cond:                                         ; preds = %call.i.noexc, %entry51  %d.0 = phi ptr [ %0, %entry ], [ %incdec.ptr, %call.i.noexc ]52  invoke void @a_copy_ctor()53  to label %call.i.noexc unwind label %catch.dispatch54 55call.i.noexc:                                     ; preds = %for.cond56  %incdec.ptr = getelementptr inbounds %struct.L, ptr %d.0, i64 157  br label %for.cond58 59catch.dispatch:                                   ; preds = %for.cond60  %1 = catchswitch within none [label %catch] unwind to caller61 62catch:                                            ; preds = %catch.dispatch63  %2 = catchpad within %1 [ptr null, i32 64, ptr null]64  %cmp16 = icmp eq ptr %0, %d.065  br i1 %cmp16, label %for.end, label %for.body66 67for.body:                                         ; preds = %for.body, %catch68  %cmp = icmp eq ptr @GV2, %d.069  br i1 %cmp, label %for.end, label %for.body70 71for.end:                                          ; preds = %for.body, %catch72  catchret from %2 to label %try.cont73 74try.cont:                                         ; preds = %for.end75  ret void76}77 78declare void @a_copy_ctor()79