[llvm] [ValueTracking] Add support for most `llvm.vector.reduce.*` ops. (PR #88320)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 11 02:21:37 PDT 2024
================
@@ -5004,6 +5077,15 @@ void computeKnownFPClass(const Value *V, const APInt &DemandedElts,
break;
}
+ // reduce min/max will choose an element from one of the vector elements,
+ // so we can infer and class information that is common to all elements.
+ case Intrinsic::vector_reduce_fmax:
+ case Intrinsic::vector_reduce_fmin:
+ case Intrinsic::vector_reduce_fmaximum:
+ case Intrinsic::vector_reduce_fminimum:
+ computeKnownFPClass(II->getArgOperand(0), Known, InterestedClasses,
+ Depth + 1, Q);
+ break;
----------------
nikic wrote:
Can you please split this into a separate PR for review by FP folks? I'm not sure things are quite as simple as that (e.g., do we need to account for denormal flush like the scalar min/max handling above)?
https://github.com/llvm/llvm-project/pull/88320
More information about the llvm-commits
mailing list