mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
CodeGen: extend f16 conversions to permit types > float.
This makes the two intrinsics @llvm.convert.from.f16 and @llvm.convert.to.f16 accept types other than simple "float". This is only strictly needed for the truncate operation, since otherwise double rounding occurs and there's no way to represent the strict IEEE conversion. However, for symmetry we allow larger types in the extend too. During legalization, we can expand an "fp16_to_double" operation into two extends for convenience, but abort when the truncate isn't legal. A new libcall is probably needed here. Even after this commit, various target tweaks are needed to actually use the extended intrinsics. I've put these into separate commits for clarity, so there are no actual tests of f64 conversion here. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213248 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -236,8 +236,8 @@ std::string SDNode::getOperationName(const SelectionDAG *G) const {
|
||||
case ISD::FP_TO_UINT: return "fp_to_uint";
|
||||
case ISD::BITCAST: return "bitcast";
|
||||
case ISD::ADDRSPACECAST: return "addrspacecast";
|
||||
case ISD::FP16_TO_FP32: return "fp16_to_fp32";
|
||||
case ISD::FP32_TO_FP16: return "fp32_to_fp16";
|
||||
case ISD::FP16_TO_FP: return "fp16_to_fp";
|
||||
case ISD::FP_TO_FP16: return "fp_to_fp16";
|
||||
|
||||
case ISD::CONVERT_RNDSAT: {
|
||||
switch (cast<CvtRndSatSDNode>(this)->getCvtCode()) {
|
||||
|
Reference in New Issue
Block a user