[PATCH] D159271: [AMDGPU][GlobalISel] Custom lowering for G_FNEARBYINT
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 31 04:58:17 PDT 2023
arsenm added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp:2321-2323
+ // FNEARBYINT and FRINT are the same, except in their handling of FP
+ // exceptions. Those aren't really meaningful for us, and OpenCL only has
+ // rint, so just treat them as equivalent.
----------------
This comment is really old and doesn't make much sense anymore. The existence of nearbyint and rint as an artifact of before there was a direction on how to handle strictfp.
We have 3 intrinsics that all mean exactly the same thing, and then constrained versions of all the rounding intrinsics. Really we should just get rid of rint and nearbyint in favor of only having roundeven. Would be better to just make this a generic lower that swaps to one or the other that doesn't need to consider the types
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D159271/new/
https://reviews.llvm.org/D159271
More information about the llvm-commits
mailing list