[llvm] [AMDGPU] Implement llvm.lrint intrinsic lowering (PR #98931)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 19 04:02:43 PDT 2024
================
@@ -4326,6 +4326,16 @@ bool SelectionDAGLegalize::ExpandNode(SDNode *Node) {
// targets where it is not needed.
Results.push_back(Node->getOperand(0));
break;
+ case ISD::LRINT:
+ case ISD::LLRINT: {
+ SDValue Arg = Node->getOperand(0);
+ EVT ArgVT = Arg.getValueType();
+ EVT ResVT = Node->getValueType(0);
+ SDLoc dl(Node);
+ SDValue RoundNode = DAG.getNode(ISD::FROUNDEVEN, dl, ArgVT, Arg);
----------------
arsenm wrote:
Ditto, just use ISD::FRINT until we consolidate these
https://github.com/llvm/llvm-project/pull/98931
More information about the llvm-commits
mailing list