brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.2 KiB · 14f2046 Raw
63 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt -passes=loop-vectorize -S %s | FileCheck %s3 4target triple = "i386-unknow-linux"5 6define void @icmp_predicate_and_branch_cost(i32 %size, ptr %dst, i64 %conv5.i) #0 {7; CHECK-LABEL: @icmp_predicate_and_branch_cost(8; CHECK-NEXT:  entry:9; CHECK-NEXT:    br label [[LOOP_HEADER:%.*]]10; CHECK:       loop.header:11; CHECK-NEXT:    [[IV:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[IV_NEXT:%.*]], [[LOOP_LATCH:%.*]] ]12; CHECK-NEXT:    [[EXT_IV:%.*]] = zext i32 [[IV]] to i6413; CHECK-NEXT:    [[ADD_IV:%.*]] = add i64 [[EXT_IV]], 814; CHECK-NEXT:    [[C_1:%.*]] = icmp ugt i64 [[ADD_IV]], [[CONV5_I:%.*]]15; CHECK-NEXT:    br i1 [[C_1]], label [[THEN_1:%.*]], label [[LOOP_LATCH]]16; CHECK:       then.1:17; CHECK-NEXT:    [[C_2:%.*]] = icmp ult i32 [[IV]], [[SIZE:%.*]]18; CHECK-NEXT:    br i1 [[C_2]], label [[THEN_2:%.*]], label [[LOOP_LATCH]]19; CHECK:       then.2:20; CHECK-NEXT:    [[OR:%.*]] = or i32 [[SIZE]], [[IV]]21; CHECK-NEXT:    [[TRUNC_OR:%.*]] = trunc i32 [[OR]] to i822; CHECK-NEXT:    br label [[LOOP_LATCH]]23; CHECK:       loop.latch:24; CHECK-NEXT:    [[SINK:%.*]] = phi i8 [ [[TRUNC_OR]], [[THEN_2]] ], [ 1, [[LOOP_HEADER]] ], [ 0, [[THEN_1]] ]25; CHECK-NEXT:    store i8 [[SINK]], ptr [[DST:%.*]], align 126; CHECK-NEXT:    [[IV_NEXT]] = trunc i64 [[ADD_IV]] to i3227; CHECK-NEXT:    [[C_3:%.*]] = icmp ugt i32 [[SIZE]], [[IV]]28; CHECK-NEXT:    br i1 [[C_3]], label [[LOOP_HEADER]], label [[EXIT:%.*]]29; CHECK:       exit:30; CHECK-NEXT:    ret void31;32entry:33  br label %loop.header34 35loop.header:36  %iv = phi i32 [ 0, %entry ], [ %iv.next, %loop.latch ]37  %ext.iv = zext i32 %iv to i6438  %add.iv = add i64 %ext.iv, 839  %c.1 = icmp ugt i64 %add.iv, %conv5.i40  br i1 %c.1, label %then.1, label %loop.latch41 42then.1:43  %c.2 = icmp ult i32 %iv, %size44  br i1 %c.2, label %then.2, label %loop.latch45 46then.2:47  %or = or i32 %size, %iv48  %trunc.or = trunc i32 %or to i849  br label %loop.latch50 51loop.latch:52  %sink = phi i8 [ %trunc.or, %then.2 ], [ 1, %loop.header ], [ 0, %then.1 ]53  store i8 %sink, ptr %dst, align 154  %iv.next = trunc i64 %add.iv to i3255  %c.3 = icmp ugt i32 %size, %iv56  br i1 %c.3, label %loop.header, label %exit57 58exit:59  ret void60}61 62attributes #0 = { mustprogress "target-cpu"="pentium4" }63