diff options
| author | Diana Picus <diana.picus@linaro.org> | 2017-04-07 09:41:39 +0000 |
|---|---|---|
| committer | Diana Picus <diana.picus@linaro.org> | 2017-04-07 09:41:39 +0000 |
| commit | a5bab61a8d3bf8c79837e5fcb558fcfb6bc3fcb3 (patch) | |
| tree | 5a6868d00f89452284938895ecffb356f2ef3749 /llvm/lib/Target | |
| parent | 434b333afd2e287e2b44f98e75531a6d4db6984c (diff) | |
| download | bcm5719-llvm-a5bab61a8d3bf8c79837e5fcb558fcfb6bc3fcb3.tar.gz bcm5719-llvm-a5bab61a8d3bf8c79837e5fcb558fcfb6bc3fcb3.zip | |
[ARM] GlobalISel: Support frem for 32-bit values
Legalize to a libcall.
On this occasion, also start allowing soft float subtargets. For the
moment G_FREM is the only legal floating point operation for them.
llvm-svn: 299753
Diffstat (limited to 'llvm/lib/Target')
| -rw-r--r-- | llvm/lib/Target/ARM/ARMCallLowering.cpp | 4 | ||||
| -rw-r--r-- | llvm/lib/Target/ARM/ARMLegalizerInfo.cpp | 4 |
2 files changed, 3 insertions, 5 deletions
diff --git a/llvm/lib/Target/ARM/ARMCallLowering.cpp b/llvm/lib/Target/ARM/ARMCallLowering.cpp index 10e144f8900..94b317a8f98 100644 --- a/llvm/lib/Target/ARM/ARMCallLowering.cpp +++ b/llvm/lib/Target/ARM/ARMCallLowering.cpp @@ -333,10 +333,6 @@ bool ARMCallLowering::lowerFormalArguments(MachineIRBuilder &MIRBuilder, if (Subtarget->isThumb()) return false; - // FIXME: Support soft float (when we're ready to generate libcalls) - if (Subtarget->useSoftFloat() || !Subtarget->hasVFP2()) - return false; - for (auto &Arg : F.args()) if (!isSupportedType(DL, TLI, Arg.getType())) return false; diff --git a/llvm/lib/Target/ARM/ARMLegalizerInfo.cpp b/llvm/lib/Target/ARM/ARMLegalizerInfo.cpp index cc30547a7b4..64cca82f13e 100644 --- a/llvm/lib/Target/ARM/ARMLegalizerInfo.cpp +++ b/llvm/lib/Target/ARM/ARMLegalizerInfo.cpp @@ -57,7 +57,7 @@ ARMLegalizerInfo::ARMLegalizerInfo(const ARMSubtarget &ST) { setAction({G_CONSTANT, s32}, Legal); - if (ST.hasVFP2()) { + if (!ST.useSoftFloat() && ST.hasVFP2()) { setAction({G_FADD, s32}, Legal); setAction({G_FADD, s64}, Legal); @@ -65,5 +65,7 @@ ARMLegalizerInfo::ARMLegalizerInfo(const ARMSubtarget &ST) { setAction({G_STORE, s64}, Legal); } + setAction({G_FREM, s32}, Libcall); + computeTables(); } |

