llvm-6502/lib
Stepan Dyatkovskiy c628af024e Fix for PR18102.
Issue outcomes from DAGCombiner::MergeConsequtiveStores, more precisely from
mem-ops sequence sorting.

Consider, how MergeConsequtiveStores works for next example:

store i8 1, a[0]
store i8 2, a[1]
store i8 3, a[1]   ; a[1] again.
return   ; DAG starts here

1. Method will collect all the 3 stores.
2. It sorts them by distance from the base pointer (farthest with highest
index).
3. It takes first consecutive non-overlapping stores and (if possible) replaces
them with a single store instruction.

The point is, we can't determine here which 'store' instruction
would be the second after sorting ('store 2' or 'store 3').
It happens that 'store 3' would be the second, and 'store 2' would be the third.

So after merging we have the next result:

store i16 (1 | 3 << 8), base   ; is a[0] but bit-casted to i16
store i8 2, a[1]

So actually we swapped 'store 3' and 'store 2' and got wrong contents in a[1].

Fix: In sort routine just also take into account mem-op sequence number. 



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200201 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-27 09:18:31 +00:00
..
Analysis Revert "Revert "Add Constant Hoisting Pass" (r200034)" 2014-01-25 02:02:55 +00:00
AsmParser
Bitcode Make parseBitcodeFile return an ErrorOr<Module *>. 2014-01-15 01:08:23 +00:00
CodeGen Fix for PR18102. 2014-01-27 09:18:31 +00:00
DebugInfo [Sparc] Add support for parsing DW_CFA_GNU_window_save. 2014-01-26 05:13:44 +00:00
ExecutionEngine Fix known typos 2014-01-24 17:20:08 +00:00
IR Fix llvm-dis to print the inalloca bit on allocas. 2014-01-25 01:24:06 +00:00
IRReader
Linker
LTO Construct the MCStreamer before constructing the MCTargetStreamer. 2014-01-26 06:06:37 +00:00
MC AsmParser: improve diagnostics for invalid variants 2014-01-26 22:29:43 +00:00
Object llvm-readobj: add support for PE32+ (Windows 64 bit executable). 2014-01-26 04:15:52 +00:00
Option
Support Roll back the ConstStringRef change for now 2014-01-27 05:24:39 +00:00
TableGen
Target R600/SI: Add intrinsic for BUFFER_LOAD_DWORD* instructions 2014-01-27 07:20:51 +00:00
Transforms [vectorizer] Clean up the handling of unvectorized loop unrolling in the 2014-01-27 08:17:58 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile