llvm-project/llvm/lib
Alex Bradbury 2146e8fb1e [RISCV] Constant materialisation for RV64I
This commit introduces support for materialising 64-bit constants for RV64I,
making use of the RISCVMatInt::generateInstSeq helper in order to share logic
for immediate materialisation with the MC layer (where it's used for the li
pseudoinstruction).

test/CodeGen/RISCV/imm.ll is updated to test RV64, and gains new 64-bit
constant tests. It would be preferable if anyext constant returns were sign
rather than zero extended (see PR39092). This patch simply adds an explicit
signext to the returns in imm.ll.

Further optimisations for constant materialisation are possible, most notably
for mask-like values which can be generated my loading -1 and shifting right.
A future patch will standardise on the C++ codepath for immediate selection on
RV32 as well as RV64, and then add further such optimisations to
RISCVMatInt::generateInstSeq in order to benefit both RV32 and RV64 for
codegen and li expansion.

Differential Revision: https://reviews.llvm.org/D52962

llvm-svn: 347042
2018-11-16 10:14:16 +00:00
..
Analysis [ThinLTO] Internalize readonly globals 2018-11-16 07:08:00 +00:00
AsmParser [ThinLTO] Internalize readonly globals 2018-11-16 07:08:00 +00:00
BinaryFormat [BinaryFormat] Add MsgPackTypes 2018-11-15 18:50:01 +00:00
Bitcode [ThinLTO] Internalize readonly globals 2018-11-16 07:08:00 +00:00
CodeGen [DAGCombine] Fix non-deterministic debug output 2018-11-16 08:35:19 +00:00
DebugInfo [NativePDB] Improved support for nested type reconstruction. 2018-11-13 20:07:32 +00:00
Demangle [MS Demangler] Print public:, protected:, private: if set in FunctionClass or a variable's StorageClass. 2018-11-13 20:18:26 +00:00
ExecutionEngine [BuildingAJIT] Update chapter 2 to use the ORCv2 APIs. 2018-11-13 01:25:34 +00:00
FuzzMutate [New PM] Introducing PassInstrumentation framework 2018-09-20 17:08:45 +00:00
Fuzzer
IR [ThinLTO] Internalize readonly globals 2018-11-16 07:08:00 +00:00
IRReader
LTO [ThinLTO] Internalize readonly globals 2018-11-16 07:08:00 +00:00
LineEditor
Linker [ThinLTO] Internalize readonly globals 2018-11-16 07:08:00 +00:00
MC [WebAssembly] Add support for the event section 2018-11-14 02:46:21 +00:00
Object [MSP430] Add MC layer 2018-11-15 12:29:43 +00:00
ObjectYAML [WebAssembly] Add support for dylink section in object format 2018-11-14 18:36:24 +00:00
OptRemarks Reland: [OptRemarks] Add library for parsing optimization remarks 2018-10-10 18:43:42 +00:00
Option [opt] Change the parameter of OptTable::PrintHelp from Name to Usage and don't append "[options] <inputs>" 2018-10-10 00:15:31 +00:00
Passes [LTO] Load sample profile in LTO link step. 2018-11-15 18:06:42 +00:00
ProfileData Support for remapping profile data when symbols change, for sample-based 2018-10-10 21:31:01 +00:00
Support [VFS] Implement `RedirectingFileSystem::getRealPath`. 2018-11-16 01:15:54 +00:00
TableGen [TableGen] fix assert in !cast when used out of definition in a multiclass 2018-10-10 10:52:57 +00:00
Target [RISCV] Constant materialisation for RV64I 2018-11-16 10:14:16 +00:00
Testing Fix error with SmallString implicit conversion. 2018-09-06 22:47:32 +00:00
ToolDrivers [opt] Change the parameter of OptTable::PrintHelp from Name to Usage and don't append "[options] <inputs>" 2018-10-10 00:15:31 +00:00
Transforms [ThinLTO] Internalize readonly globals 2018-11-16 07:08:00 +00:00
WindowsManifest Convert line endings of lib/WindowsManifest/CMakeLists.txt to unix. 2018-04-07 04:28:08 +00:00
XRay [XRay] Improve FDR trace handling and error messaging 2018-11-09 06:26:48 +00:00
CMakeLists.txt Reland: [OptRemarks] Add library for parsing optimization remarks 2018-10-10 18:43:42 +00:00
LLVMBuild.txt Reland: [OptRemarks] Add library for parsing optimization remarks 2018-10-10 18:43:42 +00:00