[PATCH] D116333: [RISCV] Initial support for scalable vectorization

Jessica Clarke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 28 11:12:24 PST 2021


jrtc27 added inline comments.


================
Comment at: llvm/test/Transforms/LoopVectorize/RISCV/scalable-vectorization.ll:2
+; REQUIRES: asserts
+; RUN: opt -mtriple=riscv64-linux-gnu -mattr=+experimental-v -riscv-v-vector-bits-min=128 -force-target-instruction-cost=1 -loop-vectorize -S -debug-only=loop-vectorize -scalable-vectorization=off < %s 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK_SCALABLE_DISABLED
+; RUN: opt -mtriple=riscv64-linux-gnu -mattr=+experimental-v -riscv-v-vector-bits-min=128 -force-target-instruction-cost=1 -loop-vectorize -S -debug-only=loop-vectorize -scalable-vectorization=on < %s 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK_SCALABLE_ON
----------------
Use update_test_checks.py, and preferably show the changes to the test case with this patch, not the whole test case, so it's clear what's been improved.


================
Comment at: llvm/test/Transforms/LoopVectorize/RISCV/scalable-vectorization.ll:2
+; REQUIRES: asserts
+; RUN: opt -mtriple=riscv64-linux-gnu -mattr=+experimental-v -riscv-v-vector-bits-min=128 -force-target-instruction-cost=1 -loop-vectorize -S -debug-only=loop-vectorize -scalable-vectorization=off < %s 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK_SCALABLE_DISABLED
+; RUN: opt -mtriple=riscv64-linux-gnu -mattr=+experimental-v -riscv-v-vector-bits-min=128 -force-target-instruction-cost=1 -loop-vectorize -S -debug-only=loop-vectorize -scalable-vectorization=on < %s 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK_SCALABLE_ON
----------------
jrtc27 wrote:
> Use update_test_checks.py, and preferably show the changes to the test case with this patch, not the whole test case, so it's clear what's been improved.
Don't use -linux-gnu targets when it's not OS-specific, just use riscv64 (aka riscv64-unknown-elf)


================
Comment at: llvm/test/Transforms/LoopVectorize/RISCV/scalable-vectorization.ll:10
+define void @test0(i32* %a, i8* %b, i32* %c) #0 {
+; CHECK: LV: Checking a loop in "test0"
+; CHECK_SCALABLE_ON: LV: Found feasible scalable VF = vscale x 2
----------------
Not actually showing the code generated? Debug output is generally not great for testing, it's often unclear what's actually going on, it can only run in builds that have debugging built in and you have to write the CHECK lines by hand.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116333/new/

https://reviews.llvm.org/D116333



More information about the llvm-commits mailing list