[all-commits] [llvm/llvm-project] e57bd1: [CFE, SystemZ] New target hook testFPKind() for c...

Jonas Paulsson via All-commits all-commits at lists.llvm.org
Thu Feb 18 10:39:06 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e57bd1ff4fb65208cb3060b62e1c48aa0aac623f
      https://github.com/llvm/llvm-project/commit/e57bd1ff4fb65208cb3060b62e1c48aa0aac623f
  Author: Jonas Paulsson <paulsson at linux.vnet.ibm.com>
  Date:   2021-02-18 (Thu, 18 Feb 2021)

  Changed paths:
    M clang/lib/CodeGen/CGBuiltin.cpp
    M clang/lib/CodeGen/TargetInfo.cpp
    M clang/lib/CodeGen/TargetInfo.h
    A clang/test/CodeGen/SystemZ/strictfp_builtins.c

  Log Message:
  -----------
  [CFE, SystemZ]  New target hook testFPKind() for checks of FP values.

The recent commit 00a6254 "Stop traping on sNaN in builtin_isnan" changed the
lowering in constrained FP mode of builtin_isnan from an FP comparison to
integer operations to avoid trapping.

SystemZ has a special instruction "Test Data Class" which is the preferred
way to do this check. This patch adds a new target hook "testFPKind()" that
lets SystemZ emit the s390_tdc intrinsic instead.

testFPKind() takes the BuiltinID as an argument and is expected to soon
handle more opcodes than just 'builtin_isnan'.

Review: Thomas Preud'homme, Ulrich Weigand
Differential Revision: https://reviews.llvm.org/D96568




More information about the All-commits mailing list