Changeset View
Changeset View
Standalone View
Standalone View
llvm/test/Transforms/LoopVectorize/nounroll.ll
; REQUIRES: asserts | ; REQUIRES: asserts | ||||
; RUN: opt < %s -passes='loop-vectorize' -debug-only=loop-vectorize -S 2>&1 | FileCheck %s | ; RUN: opt < %s -passes='loop-vectorize' -debug-only=loop-vectorize -S 2>&1 | FileCheck %s | ||||
target datalayout = "e-m:e-i64:64-n32:64-S128-v256:256:256-v512:512:512" | target datalayout = "e-m:e-i64:64-n32:64-S128-v256:256:256-v512:512:512" | ||||
; CHECK: LV: Checking a loop in 'f1' | ; CHECK: LV: Checking a loop in 'f1' | ||||
; CHECK: LV: Loop hints: force=? width=0 interleave=1 | ; CHECK: LV: Loop hints: force_vectorization=? width=0 force_interleave=? interleave=1 | ||||
define dso_local void @f1(i32 signext %n, i32* %A) { | define dso_local void @f1(i32 signext %n, i32* %A) { | ||||
entry: | entry: | ||||
%cmp1 = icmp sgt i32 %n, 0 | %cmp1 = icmp sgt i32 %n, 0 | ||||
br i1 %cmp1, label %for.body.preheader, label %for.end | br i1 %cmp1, label %for.body.preheader, label %for.end | ||||
for.body.preheader: ; preds = %entry | for.body.preheader: ; preds = %entry | ||||
%wide.trip.count = zext i32 %n to i64 | %wide.trip.count = zext i32 %n to i64 | ||||
br label %for.body | br label %for.body | ||||
Show All 10 Lines | |||||
for.end.loopexit: ; preds = %for.body | for.end.loopexit: ; preds = %for.body | ||||
br label %for.end | br label %for.end | ||||
for.end: ; preds = %for.end.loopexit, %entry | for.end: ; preds = %for.end.loopexit, %entry | ||||
ret void | ret void | ||||
} | } | ||||
; CHECK: LV: Checking a loop in 'f2' | ; CHECK: LV: Checking a loop in 'f2' | ||||
; CHECK: LV: Loop hints: force=? width=0 interleave=4 | ; CHECK: LV: Loop hints: force_vectorization=? width=0 force_interleave=? interleave=4 | ||||
define dso_local void @f2(i32 signext %n, i32* %A) { | define dso_local void @f2(i32 signext %n, i32* %A) { | ||||
entry: | entry: | ||||
%cmp1 = icmp sgt i32 %n, 0 | %cmp1 = icmp sgt i32 %n, 0 | ||||
br i1 %cmp1, label %for.body.preheader, label %for.end | br i1 %cmp1, label %for.body.preheader, label %for.end | ||||
for.body.preheader: ; preds = %entry | for.body.preheader: ; preds = %entry | ||||
%wide.trip.count = zext i32 %n to i64 | %wide.trip.count = zext i32 %n to i64 | ||||
br label %for.body | br label %for.body | ||||
Show All 10 Lines | |||||
for.end.loopexit: ; preds = %for.body | for.end.loopexit: ; preds = %for.body | ||||
br label %for.end | br label %for.end | ||||
for.end: ; preds = %for.end.loopexit, %entry | for.end: ; preds = %for.end.loopexit, %entry | ||||
ret void | ret void | ||||
} | } | ||||
; CHECK: LV: Checking a loop in 'f3' | ; CHECK: LV: Checking a loop in 'f3' | ||||
; CHECK: LV: Loop hints: force=? width=0 interleave=1 | ; CHECK: LV: Loop hints: force_vectorization=? width=0 force_interleave=? interleave=1 | ||||
define dso_local void @f3(i32 signext %n, i32* %A) { | define dso_local void @f3(i32 signext %n, i32* %A) { | ||||
entry: | entry: | ||||
%cmp1 = icmp sgt i32 %n, 0 | %cmp1 = icmp sgt i32 %n, 0 | ||||
br i1 %cmp1, label %for.body.preheader, label %for.end | br i1 %cmp1, label %for.body.preheader, label %for.end | ||||
for.body.preheader: ; preds = %entry | for.body.preheader: ; preds = %entry | ||||
%wide.trip.count = zext i32 %n to i64 | %wide.trip.count = zext i32 %n to i64 | ||||
br label %for.body | br label %for.body | ||||
Show All 25 Lines |