Arnold Schwaighofer f28a29b776 Merge load/store sequences with adresses: base + index + offset
We would also like to merge sequences that involve a variable index like in the
example below.

    int index = *idx++
    int i0 = c[index+0];
    int i1 = c[index+1];
    b[0] = i0;
    b[1] = i1;

By extending the parsing of the base pointer to handle dags that contain a
base, index, and offset we can handle examples like the one above.

The dag for the code above will look something like:

 (load (i64 add (i64 copyfromreg %c)
                (i64 signextend (i8 load %index))))

 (load (i64 add (i64 copyfromreg %c)
                (i64 signextend (i32 add (i32 signextend (i8 load %index))
                                         (i32 1)))))

The code that parses the tree ignores the intermediate sign extensions. However,
if there is a sign extension it needs to be on all indexes.

 (load (i64 add (i64 copyfromreg %c)
                (i64 signextend (add (i8 load %index)
                                     (i8 1))))
 vs

 (load (i64 add (i64 copyfromreg %c)
                (i64 signextend (i32 add (i32 signextend (i8 load %index))
                                         (i32 1)))))
radar://13536387

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178483 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-01 18:12:58 +00:00
..
2013-03-25 13:47:46 +00:00
2012-11-12 06:49:17 +00:00
2012-10-25 17:50:05 +00:00
2013-03-06 00:17:04 +00:00
2013-03-06 00:17:04 +00:00
2013-03-06 00:17:04 +00:00
2013-03-06 00:17:04 +00:00
2013-03-06 00:17:04 +00:00
2013-03-06 00:17:04 +00:00
2013-03-06 00:17:04 +00:00
2013-03-06 00:17:04 +00:00
2013-03-06 00:17:04 +00:00
2013-03-06 00:17:04 +00:00
2013-01-20 08:35:56 +00:00
2013-02-16 12:16:56 +00:00
2013-03-09 18:25:40 +00:00
2013-03-01 18:40:30 +00:00
2013-02-25 23:01:03 +00:00
2013-03-01 19:23:37 +00:00
2013-03-01 19:23:37 +00:00
2013-03-01 19:23:37 +00:00
2013-03-01 19:23:37 +00:00
2012-09-12 21:43:09 +00:00
2013-03-01 19:23:37 +00:00
2012-09-17 18:05:20 +00:00
2012-10-01 16:44:04 +00:00
2012-10-23 21:40:15 +00:00
2012-10-29 17:57:12 +00:00
2013-02-12 16:07:27 +00:00
2013-02-20 18:04:21 +00:00
2013-03-20 02:33:21 +00:00
2013-03-14 06:57:42 +00:00
2013-03-26 18:15:45 +00:00
2012-09-26 08:24:51 +00:00
2012-12-02 15:46:02 +00:00
2013-01-08 18:27:24 +00:00
2012-09-26 08:24:51 +00:00
2012-09-26 08:24:51 +00:00
2012-09-26 08:24:51 +00:00
2012-11-08 07:28:54 +00:00
2013-01-08 18:27:24 +00:00
2013-02-19 17:11:48 +00:00
2013-03-15 00:10:23 +00:00
2013-03-09 18:25:40 +00:00
2012-10-25 17:50:05 +00:00
2012-10-25 17:50:05 +00:00
2013-03-26 22:47:01 +00:00