llvm-6502/lib
Hal Finkel 3da41a28a1 Revert "Revert '[DAGCombiner] Split up an indexed load if only the base pointer value is live'"
I reverted r208640 in r209747 because r208640 broke self-hosting on PPC64. The
underlying cause of the failure is that pre-inc loads with increments
represented by ISD::TargetConstants were being transformed into ISD:::ADDs with
ISD::TargetConstant operands. PPC doesn't have a pattern for those, and so they
were selected as invalid r+r adds.

This recommits r208640, rebased and with an exclusion for ISD::TargetConstant
increments. This behavior seems correct, although in the future we might want
to ask the target to split out the indexing that uses ISD::TargetConstants.

Unfortunately, I don't yet have small test case where the relevant invalid
'add' instruction is not itself dead (and thus eliminated by
DeadMachineInstructionElim -- sometimes bugpoint is too good at removing things)

Original commit message (by Adam Nemet):

Right now the load may not get DCE'd because of the side-effect of updating
the base pointer.

This can happen if we lower a read-modify-write of an illegal larger type
(e.g. i48) such that the modification only affects one of the subparts (the
lower i32 part but not the higher i16 part).  See the testcase.

In order to spot the dead load we need to revisit it when SimplifyDemandedBits
decided that the value of the load is masked off.  This is the
CommitTargetLoweringOpt piece.

I checked compile time with ARM64 by sending SPEC bitcode files through llc.
No measurable change.

Fixes <rdar://problem/16031651>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216898 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-02 06:24:04 +00:00
..
Analysis Remove an errant outer loop that contains nothing but an inner loop over exactly the same elements. While no functionality is change intended (and hence there are no changes to tests), you don't want to skip this revision if bisecting for errors. 2014-09-01 05:17:15 +00:00
AsmParser Fix typos in comments, NFC 2014-08-29 21:53:01 +00:00
Bitcode Fix a double free in llvm::getBitcodeTargetTriple. 2014-08-27 21:11:13 +00:00
CodeGen Revert "Revert '[DAGCombiner] Split up an indexed load if only the base pointer value is live'" 2014-09-02 06:24:04 +00:00
DebugInfo Don't own the buffer in object::Binary. 2014-08-19 18:44:46 +00:00
ExecutionEngine [MCJIT] Move endian-aware read/writes from RuntimeDyldMachO into 2014-08-29 23:17:47 +00:00
IR Add a convenience method to copy wrapping, exact, and fast-math flags (NFC). 2014-09-01 18:44:57 +00:00
IRReader Pass a std::unique_ptr<MemoryBuffer>& to getLazyBitcodeModule. 2014-08-26 22:00:09 +00:00
LineEditor
Linker Set comdats when lazily linking functions. 2014-08-15 20:17:08 +00:00
LTO Return a std::unique_ptr when creating a new MemoryBuffer. 2014-08-27 20:03:13 +00:00
MC MC: remove unnecessary enumeration prefix 2014-09-01 23:48:29 +00:00
Object Fix typo and formatting 2014-08-30 01:57:34 +00:00
Option Fix PR17239 by changing the semantics of the RemainingArgsClass Option kind 2014-08-22 19:29:17 +00:00
ProfileData llvm-cov: add code coverage tool that's based on coverage mapping format and clang's pgo. 2014-08-22 22:56:03 +00:00
Support Fix some cases where StringRef was being passed by const reference. Remove const from some other StringRefs since its implicitly const already. 2014-08-30 16:48:02 +00:00
TableGen Comment only: Annotate loop as per mailing list discussion 2014-08-29 22:43:30 +00:00
Target [PowerPC] Guard against illegal selection of add for TargetConstant operands 2014-09-02 06:23:54 +00:00
Transforms SROA: Don't insert instructions before a PHI 2014-09-01 21:20:14 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile