brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.4 KiB · 049d264 Raw
68 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -relocation-model=static -mtriple=x86_64-unknown-linux-gnu | FileCheck %s3 4; The inner loop should require only one add (and no leas either).5; rdar://81003806 7@flags = external dso_local global [8192 x i8], align 16 ; <ptr> [#uses=1]8 9define void @foo() nounwind {10; CHECK-LABEL: foo:11; CHECK:       # %bb.0: # %entry12; CHECK-NEXT:    movl $2, %eax13; CHECK-NEXT:    .p2align 414; CHECK-NEXT:  .LBB0_1: # %bb715; CHECK-NEXT:    # =>This Loop Header: Depth=116; CHECK-NEXT:    # Child Loop BB0_2 Depth 217; CHECK-NEXT:    movl $2, %ecx18; CHECK-NEXT:    .p2align 419; CHECK-NEXT:  .LBB0_2: # %bb1120; CHECK-NEXT:    # Parent Loop BB0_1 Depth=121; CHECK-NEXT:    # => This Inner Loop Header: Depth=222; CHECK-NEXT:    movb $0, flags(%rcx)23; CHECK-NEXT:    addq %rax, %rcx24; CHECK-NEXT:    cmpq $8192, %rcx # imm = 0x200025; CHECK-NEXT:    jl .LBB0_226; CHECK-NEXT:  # %bb.3: # %bb1627; CHECK-NEXT:    # in Loop: Header=BB0_1 Depth=128; CHECK-NEXT:    incq %rax29; CHECK-NEXT:    cmpq $8192, %rax # imm = 0x200030; CHECK-NEXT:    jl .LBB0_131; CHECK-NEXT:  # %bb.4: # %bb2032; CHECK-NEXT:    retq33entry:34  br label %bb35 36bb:                                               ; preds = %entry37  br label %bb738 39bb7:                                              ; preds = %bb, %bb1740  %tmp8 = phi i64 [ %tmp18, %bb17 ], [ 2, %bb ]   ; <i64> [#uses=2]41  br label %bb1042 43bb10:                                             ; preds = %bb744  br label %bb1145 46bb11:                                             ; preds = %bb10, %bb1147  %tmp12 = phi i64 [ %tmp14, %bb11 ], [ 2, %bb10 ] ; <i64> [#uses=2]48  %tmp13 = getelementptr inbounds [8192 x i8], ptr @flags, i64 0, i64 %tmp12 ; <ptr> [#uses=1]49  store i8 0, ptr %tmp13, align 150  %tmp14 = add nsw i64 %tmp12, %tmp8              ; <i64> [#uses=2]51  %tmp15 = icmp slt i64 %tmp14, 8192              ; <i1> [#uses=1]52  br i1 %tmp15, label %bb11, label %bb1653 54bb16:                                             ; preds = %bb1155  br label %bb1756 57bb17:                                             ; preds = %bb16, %bb758  %tmp18 = add nsw i64 %tmp8, 1                   ; <i64> [#uses=2]59  %tmp19 = icmp slt i64 %tmp18, 8192              ; <i1> [#uses=1]60  br i1 %tmp19, label %bb7, label %bb2061 62bb20:                                             ; preds = %bb1763  br label %bb2164 65bb21:                                             ; preds = %bb20, %entry66  ret void67}68