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

Paul Walker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 1 06:55:35 PDT 2021


paulwalker-arm added a comment.

Just adding an extra datapoint to do with as you wish.



================
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:
----------------
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.


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

https://reviews.llvm.org/D112548



More information about the llvm-commits mailing list