[llvm] [ValueTracking] Implement `computeKnownFPClass` for `llvm.vector.reduce.{fmin,fmax,fmaximum,fminimum}` (PR #88408)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 15 03:30:35 PDT 2024
================
@@ -0,0 +1,119 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 2
+; RUN: opt < %s -S -passes=instcombine | FileCheck %s
+
+define i1 @vector_reduce_maximum_signbit(<4 x double> nofpclass(nan nzero) %x) {
+; CHECK-LABEL: define i1 @vector_reduce_maximum_signbit
+; CHECK-SAME: (<4 x double> nofpclass(nan nzero) [[X:%.*]]) {
+; CHECK-NEXT: ret i1 true
+;
+ %x.abs = call <4 x double> @llvm.fabs.v4f64(<4 x double> %x)
+ %op = call double @llvm.vector.reduce.fmaximum.v4f64(<4 x double> %x.abs)
+ %cmp = fcmp oge double %op, 0.0
----------------
dtcxzyw wrote:
Please use `bitcast + icmp` instead.
https://github.com/llvm/llvm-project/pull/88408
More information about the llvm-commits
mailing list