summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorDiana Picus <diana.picus@linaro.org>2017-04-11 10:52:34 +0000
committerDiana Picus <diana.picus@linaro.org>2017-04-11 10:52:34 +0000
commit1314a2889c66b22c4175432fe43c6a129350396d (patch)
tree049c5c384f6a252866f822fe8b58d7adc3d61bf3 /llvm/lib/Target
parente63a39d6cb5dac53b30e0dbda1af979f01a81158 (diff)
downloadbcm5719-llvm-1314a2889c66b22c4175432fe43c6a129350396d.tar.gz
bcm5719-llvm-1314a2889c66b22c4175432fe43c6a129350396d.zip
GlobalISel: Allow legalizing G_FADD to a libcall
Use the same handling in the generic legalizer code as for the other libcalls (G_FREM, G_FPOW). Enable it on ARM for float and double so we can test it. llvm-svn: 299931
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/ARM/ARMLegalizerInfo.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMLegalizerInfo.cpp b/llvm/lib/Target/ARM/ARMLegalizerInfo.cpp
index a1097af6e85..994bbd673dd 100644
--- a/llvm/lib/Target/ARM/ARMLegalizerInfo.cpp
+++ b/llvm/lib/Target/ARM/ARMLegalizerInfo.cpp
@@ -63,6 +63,9 @@ ARMLegalizerInfo::ARMLegalizerInfo(const ARMSubtarget &ST) {
setAction({G_LOAD, s64}, Legal);
setAction({G_STORE, s64}, Legal);
+ } else {
+ for (auto Ty : {s32, s64})
+ setAction({G_FADD, Ty}, Libcall);
}
for (unsigned Op : {G_FREM, G_FPOW})
OpenPOWER on IntegriCloud