[all-commits] [llvm/llvm-project] 1b6eb5: Stop traping on sNaN in __builtin_isinf

RoboTux via All-commits all-commits at lists.llvm.org
Tue Mar 2 07:55:14 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1b6eb56aa0ea2931866455a21a138fc09c08e905
      https://github.com/llvm/llvm-project/commit/1b6eb56aa0ea2931866455a21a138fc09c08e905
  Author: Thomas Preud'homme <thomasp at graphcore.ai>
  Date:   2021-03-02 (Tue, 02 Mar 2021)

  Changed paths:
    M clang/lib/CodeGen/CGBuiltin.cpp
    M clang/test/CodeGen/X86/strictfp_builtins.c
    M clang/test/CodeGen/aarch64-strictfp-builtins.c
    M clang/test/CodeGen/builtin_float_strictfp.c
    M clang/test/CodeGen/strictfp_builtins.c

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

__builtin_isinf 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: mibintc

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




More information about the All-commits mailing list