35 lines · plain
1; REQUIRES: asserts2; RUN: opt < %s -passes=loop-vectorize -prefer-predicate-over-epilogue=predicate-else-scalar-epilogue -force-tail-folding-style=data \3; RUN: -mtriple riscv64-linux-gnu -mattr=+v,+f -S -disable-output -debug-only=loop-vectorize 2>&1 | FileCheck %s --check-prefix=DATA4 5; RUN: opt < %s -passes=loop-vectorize -prefer-predicate-over-epilogue=predicate-else-scalar-epilogue \6; RUN: -mtriple riscv64-linux-gnu -mattr=+v,+f -S \7; RUN: -disable-output -debug-only=loop-vectorize 2>&1 | FileCheck %s --check-prefix=EVL8 9; DATA: Cost of 2 for VF 2: EMIT{{.*}} = active lane mask10; DATA: Cost of 4 for VF 4: EMIT{{.*}} = active lane mask11; DATA: Cost of 8 for VF 8: EMIT{{.*}} = active lane mask12; DATA: Cost of 2 for VF vscale x 1: EMIT{{.*}} = active lane mask13; DATA: Cost of 4 for VF vscale x 2: EMIT{{.*}} = active lane mask14; DATA: Cost of 8 for VF vscale x 4: EMIT{{.*}} = active lane mask15 16; EVL: Cost of 1 for VF vscale x 1: EMIT{{.*}} = EXPLICIT-VECTOR-LENGTH17; EVL: Cost of 1 for VF vscale x 2: EMIT{{.*}} = EXPLICIT-VECTOR-LENGTH18; EVL: Cost of 1 for VF vscale x 4: EMIT{{.*}} = EXPLICIT-VECTOR-LENGTH19 20define void @simple_memset(i32 %val, ptr %ptr, i64 %n) #0 {21entry:22 br label %while.body23 24while.body: ; preds = %while.body, %entry25 %index = phi i64 [ %index.next, %while.body ], [ 0, %entry ]26 %gep = getelementptr i32, ptr %ptr, i64 %index27 store i32 %val, ptr %gep28 %index.next = add nsw i64 %index, 129 %cmp10 = icmp ult i64 %index.next, %n30 br i1 %cmp10, label %while.body, label %while.end.loopexit31 32while.end.loopexit: ; preds = %while.body33 ret void34}35