aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/CommandLine.cpp
diff options
context:
space:
mode:
authorwanglei <wanglei@loongson.cn>2022-11-03 11:10:41 +0800
committerWeining Lu <luweining@loongson.cn>2022-11-03 11:40:50 +0800
commit5adb090795914a4122492117f3af8dacaf69301f (patch)
tree1ad2eafeaae1340980f4728f2532fd2cbe7fc3b6 /llvm/lib/Support/CommandLine.cpp
parent1024497fffd18bba92485852cfedebb829499953 (diff)
downloadllvm-5adb090795914a4122492117f3af8dacaf69301f.zip
llvm-5adb090795914a4122492117f3af8dacaf69301f.tar.gz
llvm-5adb090795914a4122492117f3af8dacaf69301f.tar.bz2
[LoongArch] Fix codegen for [su]itofp instructions
This patch fixes codegen for `[su]itofp` instructions. In LoongArch, a legal int-to-float conversion is done in two steps: 1. Move the data from `GPR` to `FPR`. (FRLen >= GRLen) 2. Conversion in `FPR`. (the data in `FPR` is treated as a signed value) Based on the above features, when the type's BitWidth meets the requirements, all `SINT_TO_FP` are legal, all `UINT_TO_FP` are expand and lowered to libcall when appropriate. The only special case is, LoongArch64 with `+f,-d` features. At this point, custom processing is required for `[SU]INT_TO_FP`. Of course, we can also ignore it and use libcall directly. Differential Revision: https://reviews.llvm.org/D136916
Diffstat (limited to 'llvm/lib/Support/CommandLine.cpp')
0 files changed, 0 insertions, 0 deletions