summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMLegalizerInfo.cpp
diff options
context:
space:
mode:
authorDiana Picus <diana.picus@linaro.org>2018-01-30 09:15:17 +0000
committerDiana Picus <diana.picus@linaro.org>2018-01-30 09:15:17 +0000
commit517531e5a59e436abc462bb84a4e656cfd6d2f69 (patch)
tree01b5aeda505f600cd103ae0a4a979badba1e537e /llvm/lib/Target/ARM/ARMLegalizerInfo.cpp
parentc4ccfb5d932909e64511bcfdc995ab20a80b2a89 (diff)
downloadbcm5719-llvm-517531e5a59e436abc462bb84a4e656cfd6d2f69.tar.gz
bcm5719-llvm-517531e5a59e436abc462bb84a4e656cfd6d2f69.zip
[ARM GlobalISel] Legalize G_SITOFP and G_UITOFP
Legal if we have hardware support, libcall otherwise. Also add supporting code to the legalizer helper for libcalls. llvm-svn: 323730
Diffstat (limited to 'llvm/lib/Target/ARM/ARMLegalizerInfo.cpp')
-rw-r--r--llvm/lib/Target/ARM/ARMLegalizerInfo.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMLegalizerInfo.cpp b/llvm/lib/Target/ARM/ARMLegalizerInfo.cpp
index 4082d4e68ab..2d09bcae3d8 100644
--- a/llvm/lib/Target/ARM/ARMLegalizerInfo.cpp
+++ b/llvm/lib/Target/ARM/ARMLegalizerInfo.cpp
@@ -192,6 +192,12 @@ ARMLegalizerInfo::ARMLegalizerInfo(const ARMSubtarget &ST) {
for (auto Ty : {s32, s64})
setAction({Op, 1, Ty}, Legal);
}
+
+ for (unsigned Op : {G_SITOFP, G_UITOFP}) {
+ setAction({Op, 1, s32}, Legal);
+ for (auto Ty : {s32, s64})
+ setAction({Op, Ty}, Legal);
+ }
} else {
for (unsigned BinOp : {G_FADD, G_FSUB, G_FMUL, G_FDIV})
for (auto Ty : {s32, s64})
@@ -218,6 +224,11 @@ ARMLegalizerInfo::ARMLegalizerInfo(const ARMSubtarget &ST) {
setAction({Op, 1, s64}, Libcall);
}
+ for (unsigned Op : {G_SITOFP, G_UITOFP}) {
+ for (auto Ty : {s32, s64})
+ setAction({Op, Ty}, Libcall);
+ }
+
if (AEABI(ST))
setFCmpLibcallsAEABI();
else
OpenPOWER on IntegriCloud