[all-commits] [llvm/llvm-project] c7cd7a: [clang][test][RISCV] Pre-commit test for HasLegalH...

Alex Bradbury via All-commits all-commits at lists.llvm.org
Fri May 5 05:56:51 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c7cd7a050acb98b9d1df895c4b009c7c7078d917
      https://github.com/llvm/llvm-project/commit/c7cd7a050acb98b9d1df895c4b009c7c7078d917
  Author: Alex Bradbury <asb at igalia.com>
  Date:   2023-05-05 (Fri, 05 May 2023)

  Changed paths:
    A clang/test/CodeGen/RISCV/Float16-arith.c

  Log Message:
  -----------
  [clang][test][RISCV] Pre-commit test for HasLegalHalfType patch

This test captures the codegen difference of D145071.


  Commit: 560065b6ecd539862fbc61401b02a1d5faea1ad1
      https://github.com/llvm/llvm-project/commit/560065b6ecd539862fbc61401b02a1d5faea1ad1
  Author: Alex Bradbury <asb at igalia.com>
  Date:   2023-05-05 (Fri, 05 May 2023)

  Changed paths:
    M clang/lib/Basic/Targets/RISCV.cpp
    M clang/test/CodeGen/RISCV/Float16-arith.c

  Log Message:
  -----------
  [clang][RISCV] Set HasLegalHalfType to true if zfh is enabled

The desired semantics for HasLegalHalfType are slightly unclear in that
the comment for HasLegalHalfType says "True if the backend supports
operations on the half LLVM IR type." Which operations? We get very
limited scalar operations with zfhmin, more with zfh, and vector support
with zvfh. While the comment for hasLegalHalfType() says "Determine
whether _Float16 is supported on this target."

This patch sets HasLegalHalfType to true for zfh.

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


Compare: https://github.com/llvm/llvm-project/compare/30ce0c9508f5...560065b6ecd5


More information about the All-commits mailing list