[PATCH] D98435: [LoopVectorize] Add strict in-order reduction support for fixed-width vectorization

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 11 14:02:38 PST 2021


fhahn added inline comments.


================
Comment at: llvm/test/Transforms/LoopVectorize/AArch64/strict-fadd.ll:1
+; RUN: opt < %s -loop-vectorize -mtriple aarch64-unknown-linux-gnu -mattr=+sve -enable-strict-reducs -S | FileCheck %s -check-prefix=CHECK
+
----------------
`+sve` is not needed for the test?

Can you also add a negative test?


================
Comment at: llvm/test/Transforms/LoopVectorize/AArch64/strict-fadd.ll:118
+
+define float @fadd_conditional_rdx(float* noalias nocapture readonly %a, float* noalias nocapture readonly %b, i64 %n) {
+; CHECK-LABEL: @fadd_conditional_rdx
----------------
I don't think this test is testing what you intended it to. The condition `> 0.5f` is in the loop pre-header. I think it should be in the loop body, so it tests generating the correct mask? (The C source here is a bit misleading IMO)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98435



More information about the llvm-commits mailing list