[llvm] [ValueTracking] Implement `computeKnownFPClass` for `llvm.vector.reduce.{fmin,fmax,fmaximum,fminimum}` (PR #88408)

via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 12 11:48:15 PDT 2024


================
@@ -5004,6 +5004,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,
----------------
goldsteinn wrote:

Plan now isn't to do per-ele, although I can leave that as a todo.

Also looks like alive2 doesn't support fp reduce intrins.

https://github.com/llvm/llvm-project/pull/88408


More information about the llvm-commits mailing list