<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Oct 8, 2013, at 8:20 AM, Renato Golin <<a href="mailto:renato.golin@linaro.org">renato.golin@linaro.org</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">On 7 October 2013 23:42, Quentin Colombet <span dir="ltr"><<a href="mailto:qcolombet@apple.com" target="_blank">qcolombet@apple.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div>0001:</div><div>LGTM.</div>
</div></blockquote><div><br></div><div>+1.</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div style="word-wrap:break-word"><div>0002:<br></div><div><div>Unless I am missing the semantic of CHECK-DAG, this seems wrong:</div><div>+;CHECK-DAG: <span style="white-space:pre-wrap">   </span>str<span style="white-space:pre-wrap">     </span>r0, [sp, #8]</div>
<div>+;CHECK-DAG: <span style="white-space:pre-wrap">     </span>add<span style="white-space:pre-wrap">     </span>r0, sp, #8</div><div>How could a str-add sequence with a write-after-read dependency be semantically equivalent to a add-str with a read-after-write dependency?</div>
</div></div></blockquote><div><br></div><div>If you're referring to the first change, I think it's up to add r0 + str r2, which could then be:</div><div><br></div><div><div>;CHECK: <span class="" style="white-space:pre">    </span>str<span class="" style="white-space:pre">       </span>r0, [sp, #8]</div>
<div>;CHECK-DAG: <span class="" style="white-space:pre">        </span>add<span class="" style="white-space:pre">       </span>r0, sp, #8</div><div>;CHECK-DAG: <span class="" style="white-space:pre">     </span>str<span class="" style="white-space:pre">       </span>r2, [sp, #12]</div></div></div></div></div></blockquote>Yes I wanted the 3rd instruction being able to move between the first two. As FileCheck computes dependencies between [[Variables]] and enforces a correct order for -DAG checks I used a different solution in my updated patch:</div><div><br></div><div><div>+;CHECK-DAG:    str [[R0:r0]], [sp, #8]</div><div>+;CHECK-DAG:    add [[R0]], sp, #8</div><div>+;CHECK-DAG:    str r2, [sp, #12]</div><br><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>
</div><div><br></div><div>This also looks dangerous:</div><div><br></div><div><div>+; CHECK-DAG: vld1.32 {[[REG1:d[0-9]+]][0]}, {{\[}}[[BASE]]:32]</div><div>+; CHECK-DAG: add [[BASE2:r[0-9]+]], [[BASE]], #4</div><div>+; CHECK-DAG: vld1.32 {[[REG1]][1]}, {{\[}}[[BASE2]]:32]</div>
</div><div><br></div><div>one will define REG1 and the other will use, in this case, it's not possible for them to be in different order. If CHECK-DAG can deal with that and impose the correct ordering, than that's fine.</div></div></div></div></blockquote><div>yes FileCheck will enforce deps.</div><br><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">
<div><br></div><div>Same here, with SOURCE and ADDR:</div><div><br></div><div><div>+; CHECK-DAG:  vst1.64 {d{{[0-9]+}}, d{{[0-9]+}}}, [r[[SOURCE:[0-9]+]]:128]</div><div>+; CHECK-DAG:  add.w r[[ADDR:[0-9]+]], r[[SOURCE]], {{r[0-9]+}}, lsl #2</div>
<div>+; CHECK-DAG:  vld1.32 {[[DREG:d[0-9]+]][], [[DREG2:d[0-9]+]][]}, [r[[ADDR]]:32]</div><div><br></div></div><div>In this case, it looks impossible to have it in any other order…</div></div></div></div></blockquote>yep that’s whay I reverted that part.</div><div><br></div><div>Updated patch is attached to my answer to Quentin.</div><div><br></div><div>Thanks for the review,</div><div><span class="Apple-tab-span" style="white-space:pre">      </span>Matthias</div><div><br><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div style="word-wrap:break-word"><div>0003:</div><div>LGTM.</div></div></blockquote><div><br></div><div>+1</div><div><br></div><div>cheers,</div><div>--renato</div></div></div></div>
</blockquote></div><br></body></html>