<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">LGTM! <div><br><div><div>On Apr 1, 2013, at 9:51 AM, Arnold Schwaighofer <<a href="mailto:aschwaighofer@apple.com">aschwaighofer@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">We would also like to merge sequences that involve a variable index like in the<br>example below.<br><br>   int index = *idx++<br>   int i0 = c[index+0];<br>   int i1 = c[index+1];<br>   b[0] = i0;<br>   b[1] = i1;<br><br>By extending the parsing of the base pointer to handle dags that contain a<br>base, index, and offset we can handle examples like the one above.<br><br>The dag for the code above will look something like:<br><br>(load (i64 add (i64 copyfromreg %c)<br>               (i64 signextend (i8 load %index))))<br><br>(load (i64 add (i64 copyfromreg %c)<br>               (i64 signextend (i32 add (i32 signextend (i8 load %index))<br>                                        (i32 1)))))<br><br>The code that parses the tree ignores the intermediate sign extensions. However,<br>if there is a sign extension it needs to be on all indexes.<br><br>(load (i64 add (i64 copyfromreg %c)<br>               (i64 signextend (add (i8 load %index)<br>                                    (i8 1))))<br>vs<br><br>(load (i64 add (i64 copyfromreg %c)<br>               (i64 signextend (i32 add (i32 signextend (i8 load %index))<br>                                        (i32 1)))))<br><a href="radar://13536387">radar://13536387</a><br><br><span><0001-Merge-load-store-sequences-with-adresses-base-index-.patch></span></div></blockquote></div><br></div></body></html>