[PATCH] D77013: [AMDGPU] Add options -mamdgpu-ieee -mno-amdgpu-ieee
Matt Arsenault via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 30 08:38:04 PDT 2020
arsenm added inline comments.
================
Comment at: clang/include/clang/Basic/CodeGenOptions.def:399
+/// Whether to emit IEEE754-2008 NaN compliant instructions if available (AMDGPU Only)
+CODEGENOPT(EmitIEEENaNCompliantInsts, 1, 1)
----------------
Description is misleading. Better description would be the first line from the manual,
"Floating point opcodes that support exception flag gathering quiet and propagate sig- naling NaN inputs per IEEE 754-2008"
================
Comment at: clang/include/clang/Driver/Options.td:2406
+def mamdgpu_ieee : Flag<["-"], "mamdgpu-ieee">, Flags<[CC1Option]>,
+ Group<m_Group>, HelpText<"Enable IEEE754-2008 NaN compliance in supported AMDGPU instructions">;
+def mno_amdgpu_ieee : Flag<["-"], "mno-amdgpu-ieee">, Flags<[CC1Option]>,
----------------
Ditto
================
Comment at: clang/lib/Frontend/CompilerInvocation.cpp:1434
+
+ Opts.EmitIEEENaNCompliantInsts =
+ Args.hasFlag(options::OPT_mamdgpu_ieee, options::OPT_mno_amdgpu_ieee,
----------------
Add a comment explaining why to turn it off? Also should note this is only really concerns signaling nans
================
Comment at: clang/test/CodeGenOpenCL/amdgpu-ieee.cl:20
+}
+
+// ON-NOT: attributes [[ATTRS]] = {{.*}} "amdgpu-ieee"
----------------
Should also test a non-kernel function
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77013/new/
https://reviews.llvm.org/D77013
More information about the cfe-commits
mailing list