brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · 46a4592 Raw
29 lines · plain
1; RUN: opt -disable-output -passes=loop-vectorize -pass-remarks-analysis='.*' -force-vector-width=2 2>&1 %s | FileCheck %s2 3; Make sure LV does not crash when generating remarks for loops with non-unique4; exit blocks.5define i32 @test_non_unique_exit_blocks(ptr nocapture readonly align 4 dereferenceable(1024) %data, i32 %x) {6; CHECK: loop not vectorized: Cannot vectorize early exit loop7;8entry:9  br label %for.header10 11for.header:                                         ; preds = %for.cond.lr.ph, %for.body12  %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.latch ]13  %iv.next = add nuw nsw i64 %iv, 114  %exitcond.not = icmp eq i64 %iv.next, 25615  br i1 %exitcond.not, label %header.exit, label %for.latch16 17for.latch:18  %arrayidx = getelementptr inbounds i32, ptr %data, i64 %iv19  %lv = load i32, ptr %arrayidx, align 420  %cmp1 = icmp eq i32 %lv, %x21  br i1 %cmp1, label %latch.exit, label %for.header22 23header.exit:                       ; preds = %for.body24  ret i32 025 26latch.exit:                       ; preds = %for.body27  ret i32 %lv28}29