[PATCH] D65620: [AMDGPU] Use S_DENORM_MODE for gfx10
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 1 16:50:17 PDT 2019
arsenm added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/SIISelLowering.cpp:7536-7547
+static int getSPDenormMode(bool Enable, bool IsGFX10, const GCNSubtarget *ST) {
+ int SPDenormMode = Enable ? FP_DENORM_FLUSH_NONE
+ : FP_DENORM_FLUSH_IN_FLUSH_OUT;
+
+ if (IsGFX10) {
+ int DPDenormDefault = ST->hasFP64Denormals() ? FP_DENORM_FLUSH_NONE
+ : FP_DENORM_FLUSH_IN_FLUSH_OUT;
----------------
The two instructions use different formats, so I would just split this into 2 separate functions for each case rather than checking IsGFX10 inside one
================
Comment at: llvm/lib/Target/AMDGPU/SIISelLowering.cpp:7576
+ bool IsGFX10 = Subtarget->getGeneration() >= AMDGPUSubtarget::GFX10;
if (!Subtarget->hasFP32Denormals()) {
----------------
Should move this check into a Subtarget->hasDenormModeInst()
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65620/new/
https://reviews.llvm.org/D65620
More information about the llvm-commits
mailing list