[PATCH] D89388: [AMDGPU] Fix ieee mode default value
Sebastian Neubauer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 14 05:18:35 PDT 2020
Flakebi created this revision.
Flakebi added reviewers: arsenm, nhaehnle, foad.
Herald added subscribers: llvm-commits, kerbowa, hiraditya, t-tye, tpr, dstuttard, yaxunl, jvesely, kzhuravl.
Herald added a project: LLVM.
Flakebi requested review of this revision.
Herald added a subscriber: wdng.
Previously, the default value for ieee mode was
- on for compute kernels and compute shaders,
- off for all shaders except compute shaders.
This commit changes the default to be
- on for compute kernels,
- off for shaders.
This aligns the default value with the settings that are actually in
use. To my knowledge, all users of shader calling conventions (mesa and
llpc) disable the ieee mode by default.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D89388
Files:
llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
llvm/test/CodeGen/AMDGPU/amdgcn-ieee.ll
Index: llvm/test/CodeGen/AMDGPU/amdgcn-ieee.ll
===================================================================
--- llvm/test/CodeGen/AMDGPU/amdgcn-ieee.ll
+++ llvm/test/CodeGen/AMDGPU/amdgcn-ieee.ll
@@ -93,8 +93,8 @@
; GCN-LABEL: {{^}}cs_ieee_mode_default:
; GCN: {{buffer|global|flat}}_load_dword [[VAL0:v[0-9]+]]
; GCN-NEXT: {{buffer|global|flat}}_load_dword [[VAL1:v[0-9]+]]
-; GCN-DAG: v_mul_f32_e32 [[QUIET0:v[0-9]+]], 1.0, [[VAL0]]
-; GCN-DAG: v_mul_f32_e32 [[QUIET1:v[0-9]+]], 1.0, [[VAL1]]
+; GCN-NOT: [[VAL0]]
+; GCN-NOT: [[VAL1]]
; GCN: v_min_f32_e32 [[MIN:v[0-9]+]], [[QUIET0]], [[QUIET1]]
; GCN-NOT: v_mul_f32
define amdgpu_cs void @cs_ieee_mode_default() #0 {
Index: llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
===================================================================
--- llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
+++ llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
@@ -769,10 +769,8 @@
SIModeRegisterDefaults(const Function &F);
static SIModeRegisterDefaults getDefaultForCallingConv(CallingConv::ID CC) {
- const bool IsCompute = AMDGPU::isCompute(CC);
-
SIModeRegisterDefaults Mode;
- Mode.IEEE = IsCompute;
+ Mode.IEEE = !AMDGPU::isShader(CC);
return Mode;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89388.298127.patch
Type: text/x-patch
Size: 1233 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201014/72b0b5bb/attachment.bin>
More information about the llvm-commits
mailing list