[PATCH] D101469: [RISCV] Enable interleaved vectorization for RVV

Luke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 16 02:24:38 PDT 2021


luke957 added inline comments.


================
Comment at: llvm/test/Transforms/LoopVectorize/RISCV/riscv-interleaved.ll:11-50
+define dso_local void @foo(i32 signext %n, i32* nocapture %A) local_unnamed_addr #0 {
+entry:
+  %cmp5 = icmp sgt i32 %n, 0
+  br i1 %cmp5, label %for.body.preheader, label %for.cond.cleanup
+
+for.body.preheader:                               ; preds = %entry
+  %wide.trip.count = zext i32 %n to i64
----------------
jrtc27 wrote:
> This IR is very messy, Clang-output IR does not always make for clean test cases. We don't need Function Attrs comments, we don't need press comments, many of the attributes are unnecessary, and the ones that are are best done inline. IR tests should be minimal, ideally from-scratch, but whittling Clang-produced IR down to something that could feasibly have been hand-written (or generated by a simple tool, like RVV and RVA tests) is fine.
Thanks for the review. I'll update the test case to look canonical.


================
Comment at: llvm/test/Transforms/LoopVectorize/RISCV/riscv-interleaved.ll:4
+; CHECK-LABEL: foo
+; CHECK: LV: IC is 2
+
----------------
jrtc27 wrote:
> luke957 wrote:
> > craig.topper wrote:
> > > Why are we not checking the generated IR?
> > Checking the generated IR is better.
> Why is this not using update_test_checks.py?
Yeah, using update_test_checks.py is better. But as said update_test_checks.py itself, update_test_checks.py is not designed to be authoritative about what constitutes a good test :)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101469



More information about the llvm-commits mailing list