diff options
| author | Jim Lin <jim@andestech.com> | 2025-03-07 09:23:50 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-07 09:23:50 +0800 |
| commit | 49bb51ed91b8f9a6bfa41d5e408ea5a928983f74 (patch) | |
| tree | e7943c369eff7f9f38f298f4f23215725c582c57 /llvm/lib/CodeGen/TargetLoweringBase.cpp | |
| parent | 0a63eb882a7d7630357adb6d101e08930e625e1f (diff) | |
[RISCV][LibCall] Add libcall for i64 -> bf16 (#130024)
Add support for lowering i64 -> bf16 with libcall.
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringBase.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/TargetLoweringBase.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringBase.cpp b/llvm/lib/CodeGen/TargetLoweringBase.cpp index f5ea3c0b47d6..3da66a411333 100644 --- a/llvm/lib/CodeGen/TargetLoweringBase.cpp +++ b/llvm/lib/CodeGen/TargetLoweringBase.cpp @@ -312,6 +312,8 @@ RTLIB::Libcall RTLIB::getSINTTOFP(EVT OpVT, EVT RetVT) { if (RetVT == MVT::ppcf128) return SINTTOFP_I32_PPCF128; } else if (OpVT == MVT::i64) { + if (RetVT == MVT::bf16) + return SINTTOFP_I64_BF16; if (RetVT == MVT::f16) return SINTTOFP_I64_F16; if (RetVT == MVT::f32) @@ -358,6 +360,8 @@ RTLIB::Libcall RTLIB::getUINTTOFP(EVT OpVT, EVT RetVT) { if (RetVT == MVT::ppcf128) return UINTTOFP_I32_PPCF128; } else if (OpVT == MVT::i64) { + if (RetVT == MVT::bf16) + return UINTTOFP_I64_BF16; if (RetVT == MVT::f16) return UINTTOFP_I64_F16; if (RetVT == MVT::f32) |
