[PATCH] D112548: [LoopVectorize] Propagate fast-math flags for inloop reductions

Rosie Sumpter via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 1 09:44:00 PDT 2021


RosieSumpter added inline comments.


================
Comment at: llvm/test/Transforms/LoopVectorize/AArch64/strict-fadd.ll:854
+; CHECK-UNORDERED: [[FADD4]] = fadd nnan float [[LOAD4]], [[VEC_PHI4]]
+; CHECK-UNORDERED-NOT: call fast float @llvm.vector.reduce.fadd
+; CHECK-UNORDERED: middle.block:
----------------
paulwalker-arm wrote:
> RosieSumpter wrote:
> > kmclaughlin wrote:
> > > Should `fast` here be replaced with `nnan`?
> > Yes it should! I will change that before committing.
> Generally speaking it is better for `CHECK-NOT` lines to be as small/simple as possible so that you do not end up creating a passing test just because some minor detail has changed.
> 
> In this instance the `CHECK-NOT` does not care about the instruction's flags but rather wants to ensure there is never a call to `llvm.vector.reduce.fadd`.  In this regard I think just having `CHECK-UNORDERED-NOT: @llvm.vector.reduce.fadd` would yield a more resilient test.
> 
> That said, given all the expected output is explicitly checked for I'm not sure what value these `CHECK-NOT` lines provide.
Thanks @paulwalker-arm, I will change the `CHECK-NOT` lines. Although I see what you mean about them not having value here, maybe it's best to remove them. 


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

https://reviews.llvm.org/D112548



More information about the llvm-commits mailing list