[all-commits] [llvm/llvm-project] 017599: [AMDGPU] Add options -mamdgpu-ieee -mno-amdgpu-ieee

Yaxun (Sam) Liu via All-commits all-commits at lists.llvm.org
Sat May 1 06:04:42 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0175999805cf05d91c8a127ebd8c9d54a640abe9
      https://github.com/llvm/llvm-project/commit/0175999805cf05d91c8a127ebd8c9d54a640abe9
  Author: Yaxun (Sam) Liu <yaxun.liu at amd.com>
  Date:   2021-05-01 (Sat, 01 May 2021)

  Changed paths:
    M clang/include/clang/Basic/CodeGenOptions.def
    M clang/include/clang/Basic/DiagnosticDriverKinds.td
    M clang/include/clang/Driver/Options.td
    M clang/lib/CodeGen/TargetInfo.cpp
    M clang/lib/Frontend/CompilerInvocation.cpp
    A clang/test/CodeGenOpenCL/amdgpu-ieee.cl

  Log Message:
  -----------
  [AMDGPU] Add options -mamdgpu-ieee -mno-amdgpu-ieee

AMDGPU backend need to know whether floating point opcodes that support exception
flag gathering quiet and propagate signaling NaN inputs per IEEE754-2008, which is
conveyed by a function attribute "amdgpu-ieee". "amdgpu-ieee"="false" turns this off.
Without this function attribute backend assumes it is on for compute functions.

-mamdgpu-ieee and -mno-amdgpu-ieee are added to Clang to control this function attribute.
By default it is on. -mno-amdgpu-ieee requires -fno-honor-nans or equivalent.

Reviewed by: Matt Arsenault

Differential Revision: https://reviews.llvm.org/D77013




More information about the All-commits mailing list