[PATCH] D134639: [VP][RISCV] Add vp.maxnum and vp.minnum intrinsics and RISC-V support.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 26 09:35:36 PDT 2022


craig.topper added inline comments.


================
Comment at: llvm/docs/LangRef.rst:18901
+
+      %t = minnum <4 x float> %a, %b
+      %also.r = select <4 x i1> %mask, <4 x float> %t, <4 x float> poison
----------------
There is no minnum instruction so this should be `%t = call <4 x float> @llvm.minnum.v4f32(<4 x float> %a, <4 x float> %b))`


================
Comment at: llvm/docs/LangRef.rst:18950
+
+      %t = maxnum <4 x float> %a, %b
+      %also.r = select <4 x i1> %mask, <4 x float> %t, <4 x float> poison
----------------
same comment as minnum


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:1074
   case ISD::FMUL: case ISD::VP_FMUL:
-  case ISD::FMINNUM:
-  case ISD::FMAXNUM:
+  case ISD::FMINNUM: case ISD::VP_FMINNUM:
+  case ISD::FMAXNUM: case ISD::VP_FMAXNUM:
----------------
Are there tests for this?


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:3927
   case ISD::SRL: case ISD::VP_LSHR:
-  case ISD::FMINNUM:
-  case ISD::FMAXNUM:
+  case ISD::FMINNUM: case ISD::VP_FMINNUM:
+  case ISD::FMAXNUM: case ISD::VP_FMAXNUM:
----------------
Are there tests for this?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134639/new/

https://reviews.llvm.org/D134639



More information about the llvm-commits mailing list