llvm-6502/test
Chandler Carruth 9b2d091a9c [InstCombine] Do an about-face on how LLVM canonicalizes (cast (load
...)) and (load (cast ...)): canonicalize toward the former.

Historically, we've tried to load using the type of the *pointer*, and
tried to match that type as closely as possible removing as many pointer
casts as we could and trading them for bitcasts of the loaded value.
This is deeply and fundamentally wrong.

Repeat after me: memory does not have a type! This was a hard lesson for
me to learn working on SROA.

There is only one thing that should actually drive the type used for
a pointer, and that is the type which we need to use to load from that
pointer. Matching up pointer types to the loaded value types is very
useful because it minimizes the physical size of the IR required for
no-op casts. Similarly, the only thing that should drive the type used
for a loaded value is *how that value is used*! Again, this minimizes
casts. And in fact, the *only* thing motivating types in any part of
LLVM's IR are the types used by the operations in the IR. We should
match them as closely as possible.

I've ended up removing some tests here as they were testing bugs or
behavior that is no longer present. Mostly though, this is just cleanup
to let the tests continue to function as intended.

The only fallout I've found so far from this change was SROA and I have
fixed it to not be impeded by the different type of load. If you find
more places where this change causes optimizations not to fire, those
too are likely bugs where we are assuming that the type of pointers is
"significant" for optimization purposes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220138 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-18 06:36:22 +00:00
..
Analysis [DSE] Remove no-data-layout-only type-based overlap checking 2014-10-17 11:56:00 +00:00
Assembler Delete -std-compile-opts. 2014-10-16 20:00:02 +00:00
Bindings Disable ccache for go tests. 2014-10-17 18:32:36 +00:00
Bitcode Revert "Revert "DI: Fold constant arguments into a single MDString"" 2014-10-03 20:01:09 +00:00
BugPoint Revert "Revert "DI: Fold constant arguments into a single MDString"" 2014-10-03 20:01:09 +00:00
CodeGen R600/SI: Add global atomicrmw xchg 2014-10-17 23:33:03 +00:00
DebugInfo [dwarfdump] Prettyprint DW_AT_APPLE_property_attribute bitfield values. 2014-10-10 15:51:10 +00:00
ExecutionEngine [mips] Remove XFAIL from two XPASS'ing tests on the llvm-mips-linux builder 2014-10-03 08:49:44 +00:00
Feature Delete -std-compile-opts. 2014-10-16 20:00:02 +00:00
FileCheck
Instrumentation [msan] Fix handling of byval arguments with large alignment. 2014-10-17 23:29:44 +00:00
Integer
JitListener Revert "Revert "DI: Fold constant arguments into a single MDString"" 2014-10-03 20:01:09 +00:00
Linker [dwarfdump] Print the name for referenced specification of abstract_origin DIEs. 2014-10-06 03:36:31 +00:00
LTO LTO: Add missing target triple from r218784 2014-10-01 18:49:58 +00:00
MC [mips] Add support for COP1's Branch-On-Cond-Likely instructions 2014-10-17 14:08:28 +00:00
Object Suppress llvm-ar's MRI tests for now on win32, since line_iterator is incompatible to CRLF. 2014-10-11 22:21:27 +00:00
Other [lit] Parse all strings as UTF-8 rather than ASCII. 2014-09-12 16:46:05 +00:00
TableGen [AVX512] Added intrinsics for VPCMPEQB and VPCMPEQW. 2014-09-30 11:32:22 +00:00
tools [llvm-objdump] don't test timestamp dump as that is time zone dependent 2014-10-18 02:28:01 +00:00
Transforms [InstCombine] Do an about-face on how LLVM canonicalizes (cast (load 2014-10-18 06:36:22 +00:00
Unit
Verifier [Stackmaps] Enable invoking the patchpoint intrinsic. 2014-10-17 17:39:00 +00:00
YAMLParser
.clang-format
CMakeLists.txt Add LLVMgold target to test dependencies. 2014-09-10 22:20:49 +00:00
lit.cfg Initial version of Go bindings. 2014-10-16 22:48:02 +00:00
lit.site.cfg.in Initial version of Go bindings. 2014-10-16 22:48:02 +00:00
Makefile Initial version of Go bindings. 2014-10-16 22:48:02 +00:00
Makefile.tests
TestRunner.sh