[all-commits] [llvm/llvm-project] 00a625: Stop traping on sNaN in __builtin_isnan

RoboTux via All-commits all-commits at lists.llvm.org
Fri Feb 5 10:29:03 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 00a62547da7e609d1641c107d01d95504883921f
      https://github.com/llvm/llvm-project/commit/00a62547da7e609d1641c107d01d95504883921f
  Author: Thomas Preud'homme <thomasp at graphcore.ai>
  Date:   2021-02-05 (Fri, 05 Feb 2021)

  Changed paths:
    M clang/lib/CodeGen/CGBuiltin.cpp
    A clang/test/CodeGen/X86/strictfp_builtins.c
    A clang/test/CodeGen/aarch64-strictfp-builtins.c
    A clang/test/CodeGen/strictfp_builtins.c
    R clang/test/CodeGen/strictfp_fpclassify.c
    M llvm/include/llvm/ADT/APFloat.h
    M llvm/include/llvm/IR/Type.h

  Log Message:
  -----------
  Stop traping on sNaN in __builtin_isnan

__builtin_isnan currently generates a floating-point compare operation
which triggers a trap when faced with a signaling NaN in StrictFP mode.
This commit uses integer operations instead to not generate any trap in
such a case.

Reviewed By: kpn

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




More information about the All-commits mailing list