This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU][GlobalISel] Custom lowering for G_FNEARBYINT
Needs RevisionPublic

Authored by Acim-Maravic on Aug 31 2023, 4:50 AM.

Diff Detail

Event Timeline

Acim-Maravic created this revision.Aug 31 2023, 4:50 AM
Acim-Maravic requested review of this revision.Aug 31 2023, 4:50 AM
arsenm added inline comments.Aug 31 2023, 4:58 AM
llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
2321–2323

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

arsenm requested changes to this revision.Oct 2 2023, 10:52 AM
This revision now requires changes to proceed.Oct 2 2023, 10:52 AM