brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.4 KiB · 8f773e2 Raw
52 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt -passes=loop-vectorize -force-vector-width=1 -force-vector-interleave=2 -S %s | FileCheck --check-prefix=VF1 %s3; RUN: opt -passes=loop-vectorize -force-vector-width=2 -force-vector-interleave=1 -S %s | FileCheck --check-prefix=VF2 %s4 5@f = external dso_local global i32, align 46 7define void @int_iv_based_on_pointer_iv(ptr %A) {8; VF1-LABEL: @int_iv_based_on_pointer_iv(9; VF1:       vector.body:10; VF1-NEXT:    [[INDEX:%.*]] = phi i64 [ 0, %vector.ph ], [ [[INDEX_NEXT:%.*]], %vector.body ]11; VF1-NEXT:    [[OFFSET_IDX:%.*]] = mul i64 [[INDEX]], 412; VF1-NEXT:    [[INDUCTION3:%.*]] = add i64 [[OFFSET_IDX]], 413; VF1-NEXT:    [[TMP7:%.*]] = getelementptr inbounds i8, ptr [[A:%.*]], i64 [[OFFSET_IDX]]14; VF1-NEXT:    [[TMP8:%.*]] = getelementptr inbounds i8, ptr [[A]], i64 [[INDUCTION3]]15; VF1-NEXT:    store i8 0, ptr [[TMP7]], align 116; VF1-NEXT:    store i8 0, ptr [[TMP8]], align 117; VF1-NEXT:    [[INDEX_NEXT]] = add nuw i64 [[INDEX]], 218; VF1-NEXT:    [[TMP13:%.*]] = icmp eq i64 [[INDEX_NEXT]],19; VF1-NEXT:    br i1 [[TMP13]], label %middle.block, label %vector.body20;21; VF2-LABEL: @int_iv_based_on_pointer_iv(22; VF2:       vector.body:23; VF2-NEXT:    [[INDEX:%.*]] = phi i64 [ 0, %vector.ph ], [ [[INDEX_NEXT:%.*]], %vector.body ]24; VF2-NEXT:    [[OFFSET_IDX:%.*]] = mul i64 [[INDEX]], 425; VF2-NEXT:    [[TMP3:%.*]] = add i64 [[OFFSET_IDX]], 026; VF2-NEXT:    [[TMP4:%.*]] = add i64 [[OFFSET_IDX]], 427; VF2-NEXT:    [[TMP9:%.*]] = getelementptr inbounds i8, ptr [[A:%.*]], i64 [[TMP3]]28; VF2-NEXT:    [[TMP10:%.*]] = getelementptr inbounds i8, ptr [[A]], i64 [[TMP4]]29; VF2-NEXT:    store i8 0, ptr [[TMP9]], align 130; VF2-NEXT:    store i8 0, ptr [[TMP10]], align 131; VF2-NEXT:    [[INDEX_NEXT]] = add nuw i64 [[INDEX]], 232; VF2-NEXT:    [[TMP14:%.*]] = icmp eq i64 [[INDEX_NEXT]],33; VF2-NEXT:    br i1 [[TMP14]], label %middle.block, label %vector.body34;35entry:36  br label %loop37 38loop:39  %iv.int = phi i64 [ 0, %entry ], [ %iv.int.next, %loop ]40  %iv.ptr = phi ptr [ null, %entry ], [ %iv.ptr.next, %loop ]41  %iv.ptr.next = getelementptr inbounds i32, ptr %iv.ptr, i64 142  %gep.A = getelementptr inbounds i8, ptr %A, i64 %iv.int43  store i8 0, ptr %gep.A44  %iv.int.next = ptrtoint ptr %iv.ptr.next to i6445  %sub.ptr.sub = sub i64 ptrtoint (ptr @f to i64), %iv.int.next46  %cmp = icmp sgt i64 %sub.ptr.sub, 047  br i1 %cmp, label %loop, label %exit48 49exit:50  ret void51}52