[PATCH] D137954: Enable roundeven.
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 19 17:52:33 PST 2022
arsenm added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp:2258-2260
+ if (Subtarget->isGCN()) {
+ auto & ST = DAG.getMachineFunction().getSubtarget<GCNSubtarget>();
+ return ST.getGeneration();
----------------
Subtarget is already available as a member here, don't need to go through the function
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp:2262-2268
+ return AMDGPUSubtarget::Generation(0u);
+ }();
+
+ if (VT == MVT::f64 && Gen < AMDGPUSubtarget::SEA_ISLANDS)
+ return LowerFRINT(Op, DAG);
+
+ return DAG.getNode(ISD::FRINT, SL, VT, Arg);
----------------
You don't need a generation check here, you can just lower to whatever opcode you choose to consolidate on and let the handling of that one take care of the subtarget specific legality considerations which should already work
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