1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00
llvm-mirror/test
Yonghong Song 17ea6ea969 [BPF] implement isTruncateFree and isZExtFree in BPFTargetLowering
Currently, isTruncateFree() and isZExtFree() callbacks return false
as they are not implemented in BPF backend. This may cause suboptimal
code generation. For example, if the load in the context of zero extension
has more than one use, the pattern zextload{i8,i16,i32} will
not be generated. Rather, the load will be matched first and
then the result is zero extended.

For example, in the test together with this commit, we have
   I1: %0 = load i32, i32* %data_end1, align 4, !tbaa !2
   I2: %conv = zext i32 %0 to i64
   ...
   I3: %2 = load i32, i32* %data, align 4, !tbaa !7
   I4: %conv2 = zext i32 %2 to i64
   ...
   I5: %4 = trunc i64 %sub.ptr.lhs.cast to i32
   I6: %conv13 = sub i32 %4, %2
   ...

The I1 and I2 will match to one zextloadi32 DAG node, where SUBREG_TO_REG is
used to convert a 32bit register to 64bit one. During code generation,
SUBREG_TO_REG is a noop.

The %2 in I3 is used in both I4 and I6. If isTruncateFree() is false,
the current implementation will generate a SLL_ri and SRL_ri
for the zext part during lowering.

This patch implement isTruncateFree() in the BPF backend, so for the
above example, I3 and I4 will generate a zextloadi32 DAG node with
SUBREG_TO_REG is generated during lowering to Machine IR.

isZExtFree() is also implemented as it should help code gen as well.

This patch also enables the change in https://reviews.llvm.org/D73985
since it won't kick in generates MOV_32_64 machine instruction.

Differential Revision: https://reviews.llvm.org/D74101
2020-02-11 09:59:19 -08:00
..
Analysis [LoopCacheAnalysis]: Add support for negative stride 2020-02-10 13:22:35 -05:00
Assembler Add a test extracted from D69557 "AsmParser: Allow FMF on varargs call" 2020-01-29 16:46:45 +00:00
Bindings Remove lit feature object-emission 2020-02-10 15:57:56 -06:00
Bitcode Revert "[WPD/LowerTypeTests] Delay lowering/removal of type tests until after ICP" 2020-02-05 19:27:32 -08:00
BugPoint
CodeGen [BPF] implement isTruncateFree and isZExtFree in BPFTargetLowering 2020-02-11 09:59:19 -08:00
DebugInfo [DebugInfo] Teach LDV how to handle identical variable fragments 2020-02-11 10:20:24 +00:00
Demangle
Examples
ExecutionEngine
Feature [LoopExtractor] Convert LoopExtractor from LoopPass to ModulePass 2020-02-09 12:25:21 +02:00
FileCheck Improve error message of FileCheck when stdin is empty 2020-02-04 11:14:55 +00:00
Instrumentation [Instrumentation] Set hidden visibility for the bias variable 2020-01-28 12:07:03 -08:00
Integer
JitListener
Linker Remove lit feature object-emission 2020-02-10 15:57:56 -06:00
LTO [LTO] Add optimization remarks for removed functions 2020-01-29 15:53:51 -08:00
MachineVerifier Revert "[Support] make report_fatal_error abort instead of exit" 2020-01-15 17:52:25 -08:00
MC [AArch64] Make Read Write System Registers Read Only 2020-02-10 14:34:24 +00:00
Object [llvm-readobj] - Change the error to warning when a section name is unknown. 2020-02-10 16:01:30 +03:00
ObjectYAML [DWARF] Return Error from DWARFDebugArangeSet::extract(). 2020-01-23 12:41:05 +07:00
Other [VectorCombine] new IR transform pass for partial vector ops 2020-02-09 10:04:41 -05:00
Reduce Revert "[llvm-reduce] add ReduceAttribute delta pass" 2020-02-05 14:15:11 -05:00
SafepointIRVerifier
Support
SymbolRewriter
TableGen [llvm][TableGen] Define FieldInit::isConcrete overload 2020-02-10 18:04:58 -08:00
ThinLTO/X86 [ThinLTO] Disable "Always import constants" due to compile time issues 2020-01-30 10:12:48 -08:00
tools [test][DebugInfo][NFC] Fix line endings 2020-02-11 16:11:40 +00:00
Transforms [Attributor] Return uses do not free pointers 2020-02-11 11:02:59 -06:00
Unit
Verifier Implement -fsemantic-interposition 2020-01-31 14:02:33 +01:00
YAMLParser
.clang-format
CMakeLists.txt [CMake] Fix accidentally inverted condition 2020-02-07 15:17:25 -08:00
lit.cfg.py Remove lit feature object-emission 2020-02-10 15:57:56 -06:00
lit.site.cfg.py.in
TestRunner.sh