[llvm] [ValueTracking] Add support for most `llvm.vector.reduce.{xor,or,and}` ops. (PR #88320)

via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 11 09:25:03 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;
----------------
goldsteinn wrote:

Done, see: https://github.com/llvm/llvm-project/pull/88408

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


More information about the llvm-commits mailing list