[PATCH] D87391: [Intrinsics] define semantics for experimental fmax/fmin vector reductions
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 9 10:26:15 PDT 2020
spatel added inline comments.
================
Comment at: llvm/test/CodeGen/Thumb2/mve-vecreduce-fminmax.ll:247
+; CHECK-FP-NEXT: vminnm.f32 s0, s0, s1
+; CHECK-FP-NEXT: vminnm.f32 s0, s0, s4
; CHECK-FP-NEXT: bx lr
----------------
nikic wrote:
> This lowering looks incorrect for the case where both elements are NaN. We'll fold to +INF then. We probably have an expansion that assumes +INF is a neutral element for fminnum, but it isn't in the presence of NaNs :/
Good catch - something in vector legalization does that:
t15: v4f32 = insert_vector_elt t12, ConstantFP:f32<INF>, Constant:i32<2>
t17: v4f32 = insert_vector_elt t15, ConstantFP:f32<INF>, Constant:i32<3>
t18: f32 = vecreduce_fmin t17
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87391/new/
https://reviews.llvm.org/D87391
More information about the llvm-commits
mailing list