1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/test
Sanjay Patel 494e59d7bc [LibCallSimplifier] try harder to fold memcmp with constant arguments
Try to fold:
memcmp(X, C, ConstantLength) == 0 --> load X == *C

Without this change, we're unnecessarily checking the alignment of the constant data, 
so we miss the transform in the first 2 tests in the patch.

I noted this shortcoming of LibCallSimpifier in one of the recent CGP memcmp expansion 
patches. This doesn't help the example in:
https://bugs.llvm.org/show_bug.cgi?id=34032#c13
...directly, but it's worth short-circuiting more of these simple cases since we're 
already trying to do that.

The benefit of transforming to load+cmp is that existing IR analysis/transforms may
further simplify that code. For example, if the load of the variable is common to 
multiple memcmp calls, CSE can remove the duplicate instructions.

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

llvm-svn: 311333
2017-08-21 13:55:49 +00:00
..
Analysis [CostModel][X86][XOP] Improve costs for XOP shuffles 2017-08-16 13:50:20 +00:00
Assembler [DI] Every DIGlobalVariable should have a type. 2017-08-16 13:39:07 +00:00
Bindings
Bitcode
BugPoint
CodeGen [PowerPC] Check if the pre-increment PHI Node already exists 2017-08-21 13:36:18 +00:00
DebugInfo [AsmParser] Recommit: Hash is not a comment on some targets 2017-08-21 09:58:37 +00:00
DllTool
Examples
ExecutionEngine [AsmParser] Recommit: Hash is not a comment on some targets 2017-08-21 09:58:37 +00:00
Feature
FileCheck
Instrumentation [SanitizerCoverage] Add stack depth tracing instrumentation. 2017-08-18 18:43:30 +00:00
Integer
JitListener
LibDriver
Linker [DI] Every DIGlobalVariable should have a type. 2017-08-16 13:39:07 +00:00
LTO Revert "Emit only A Single Opt Remark When Inlining" 2017-08-20 06:55:10 +00:00
MC [AsmParser] Recommit: Hash is not a comment on some targets 2017-08-21 09:58:37 +00:00
Object Fix archive-update.test after r311296. 2017-08-20 18:31:30 +00:00
ObjectYAML
Other revert failing test 2017-08-19 12:24:41 +00:00
SafepointIRVerifier
SymbolRewriter
TableGen [globalisel][tablegen] Generate TypeObject table. NFC 2017-08-17 13:18:35 +00:00
ThinLTO/X86 Revert "Emit only A Single Opt Remark When Inlining" 2017-08-20 06:55:10 +00:00
tools [XRay][tools] Support new kinds of instrumentation map entries 2017-08-21 00:14:06 +00:00
Transforms [LibCallSimplifier] try harder to fold memcmp with constant arguments 2017-08-21 13:55:49 +00:00
Unit
Verifier Mark Verifier/invalid-eh.ll as unsupported on windows 2017-08-17 15:07:03 +00:00
YAMLParser
.clang-format
CMakeLists.txt
lit.cfg
lit.site.cfg.in
TestRunner.sh