yaxunl marked 2 inline comments 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: > yaxunl wrote: > > 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? > # You should only add the attribute "amdgpu-ieee"="false" if and only if > -mno-amdgpu-ieee is used. This is entirely orthogonal to NoHonorNaNs. The > default is amdgpu-ieee=true, and there's no need to explicitly mark the > function > > # It is an error to use -mno-amdgpu-ieee without NoHonorNaNs because we do > not implement the legalization required to manually quiet signaling nans. We > cannot silently drop the use of of this > I can add diagnostics in clang -cc1 when -mno-amdgpu-ieee is used without NoHonorNaNs. I cannot diagnose it in clang driver because there are multiple driver options affecting NoHonorNaNs and they could override each other. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77013/new/ https://reviews.llvm.org/D77013 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits