4 Commits

Author SHA1 Message Date
Alex Bradbury
8e82376863 [clang][RISCV] Set HasLegalHalfType to true if zhinx is enabled
Now that codegen support for zhinx in landed (D149811), we should set
HasLegalHalfType=true for zhinx (see D145071 for the patch doing this
for zfh).

Differential Revision: https://reviews.llvm.org/D150777
2023-05-18 15:01:48 +01:00
Alex Bradbury
86221a1281 [clang][test][RISCV] Precommit zhinx coverage in Float16-arith.c test
Now codegen support is present, we should set HasLeftHalfType=true if
zhinx is present. This adds test coverage prior to making that change.
2023-05-17 14:45:02 +01:00
Alex Bradbury
560065b6ec [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
2023-05-05 13:55:43 +01:00
Alex Bradbury
c7cd7a050a [clang][test][RISCV] Pre-commit test for HasLegalHalfType patch
This test captures the codegen difference of D145071.
2023-05-05 13:55:20 +01:00