[PATCH] D137954: Enable roundeven.

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 18 14:26:24 PST 2022


arsenm requested changes to this revision.
arsenm added inline comments.
This revision now requires changes to proceed.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp:1195
+  case ISD::FROUNDEVEN:
+    return LowerFROUND(Op, DAG);
   case ISD::FROUND: return LowerFROUND(Op, DAG);
----------------
I'm perpetually confused by the variety of rounding functions.

llvm.rint => round to nearest integer, in current rounding mode (which is assumed to be round nearest even), which is implied by being non-constrained
llvm.nearbyint => same as llvm.rint, except no FP exceptions. FP exceptions aren't supported with non-constrained intrinsics, so this distinction is pointless

llvm.round -> round, away from 0
llvm.roundeven -> round halfway nearest 0


so I think this isn't the same as round, but is supposed to be the same as llvm.rint (which we have 3 different names for)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D137954



More information about the llvm-commits mailing list