llvm-project/llvm/test
Artyom Skrobov 7fd67e25aa Adding support for TargetLoweringBase::LibCall
Summary:
TargetLoweringBase::Expand is defined as "Try to expand this to other ops,
otherwise use a libcall." For ISD::UDIV and ISD::SDIV, the choice between
the two possibilities was defined in a rather convoluted way:

- if DIVREM is legal, expand to DIVREM
- if DIVREM has a custom lowering, expand to DIVREM
- if DIVREM libcall is defined and a remainder from the same division is
  computed elsewhere, expand to a DIVREM libcall
- else, expand to a DIV libcall

This had the undesirable effect that if both DIV and DIVREM are implemented
as libcalls, then ISD::UDIV and ISD::SDIV are expanded to the heavier DIVREM
libcall, even when the remainder isn't used.

The new code adds a new LegalizeAction, TargetLoweringBase::LibCall, so that
backends can directly control whether they prefer an expansion or a conversion
to a libcall. This makes the generic lowering code even more generic,
allowing its reuse in a wider range of target-specific configurations.

The useful effect is that ARM backend will now generate a call
to __aeabi_{i,u}div rather than __aeabi_{i,u}divmod in cases where
it doesn't need the remainder. There's no functional change outside
the ARM backend.

Reviewers: t.p.northover, rengolin

Subscribers: t.p.northover, llvm-commits, aemerson

Differential Revision: http://reviews.llvm.org/D13862

llvm-svn: 250826
2015-10-20 13:14:52 +00:00
..
Analysis [CostModel] Fixed AVX integer shift costs 2015-10-17 13:23:38 +00:00
Assembler [opaque pointer type] Add textual IR support for explicit type parameter for global aliases 2015-09-11 03:22:04 +00:00
Bindings Add a way to skip the Go bindings tests even when Go is configured in 2015-09-10 05:47:43 +00:00
Bitcode Fix PR25101 - Handle anonymous functions without VST entries 2015-10-10 14:18:36 +00:00
BugPoint Make the default triple optional by allowing an empty string 2015-09-16 05:34:32 +00:00
CodeGen Adding support for TargetLoweringBase::LibCall 2015-10-20 13:14:52 +00:00
DebugInfo s/NumFiles/NumStreams/ 2015-10-15 01:39:00 +00:00
Examples Disable llvm/test/Examples/ for now while investigating. 2015-08-28 03:32:43 +00:00
ExecutionEngine [RuntimeDyld][COFF] Fix some endianness issues, re-enable the regression test. 2015-10-19 20:37:52 +00:00
Feature HHVM calling conventions. 2015-09-29 22:09:16 +00:00
FileCheck
Instrumentation [PGO] Eliminate prof data register calls on FreeBSD platform 2015-10-19 04:17:10 +00:00
Integer
JitListener DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
LTO Make the default triple optional by allowing an empty string 2015-09-16 05:34:32 +00:00
LibDriver Add support for producing thin archives in llvm-lib. 2015-07-17 16:01:11 +00:00
Linker Make the default triple optional by allowing an empty string 2015-09-16 05:34:32 +00:00
MC AVX512: Implemented encoding and intrinsics for VPBROADCASTB/W/D/Q instructions. 2015-10-20 11:56:42 +00:00
Object Fix printing of 64 bit values and make test more strict. 2015-10-01 17:57:31 +00:00
Other Make the default triple optional by allowing an empty string 2015-09-16 05:34:32 +00:00
SymbolRewriter [opaque pointer type] Add textual IR support for explicit type parameter for global aliases 2015-09-11 03:22:04 +00:00
TableGen [TableGen] Allow TokenTy in intrinsic signatures 2015-09-02 13:36:25 +00:00
Transforms [RS4GC] Re-purpose `normalizeForInvokeSafepoint`; NFC. 2015-10-20 01:06:24 +00:00
Unit
Verifier Add verification for align, dereferenceable, dereferenceable_or_null load metadata 2015-10-09 17:41:29 +00:00
YAMLParser
tools Fix windows bot failures from r250699 by removing "/" from expected path 2015-10-19 15:19:02 +00:00
.clang-format
CMakeLists.txt [CMake] check-llvm requires llvm-pdbdump. 2015-10-15 13:22:38 +00:00
Makefile Add a way to skip the Go bindings tests even when Go is configured in 2015-09-10 05:47:43 +00:00
Makefile.tests
TestRunner.sh
lit.cfg Suppress LLVM::tools/llvm-symbolizer/coff-dwarf.test for mingw, for now. 2015-10-10 02:57:02 +00:00
lit.site.cfg.in Add a way to skip the Go bindings tests even when Go is configured in 2015-09-10 05:47:43 +00:00