[PATCH] D77013: [AMDGPU] Add options -mamdgpu-ieee -mno-amdgpu-ieee

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 20 10:16:05 PDT 2021


yaxunl marked an inline comment as done.
yaxunl added inline comments.


================
Comment at: clang/lib/Frontend/CompilerInvocation.cpp:1951
+      Args.hasFlag(options::OPT_mamdgpu_ieee, options::OPT_mno_amdgpu_ieee,
+                   !LangOptsRef.NoHonorNaNs);
+
----------------
arsenm wrote:
> This should not be implied by no honor nans. This is an ABI changing option. We need to require that no nans FP math is enabled to use this mode correctly though
OK I plan to make changes about this. However I need to clarify about when should we add function attribute amdgpu-ieee=false:

1. when neither -mamdgpu-ieee nor -mno-amdgpu-ieee is specified, we will add func attr amdgpu-ieee=false if LangOptsRef.NoHonorNaNs is true

2. when -mamdgpu-ieee or -mno-amdgpu-ieee is specified, we will add func attr amdgpu-ieee=false solely based on these two options, disregarding LangOptsRef.NoHonorNaNs

Is that correct?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77013/new/

https://reviews.llvm.org/D77013



More information about the cfe-commits mailing list