<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;">Hi Matthias,<div><br><div><div>On Oct 10, 2013, at 3:35 PM, Matthias Braun <<a href="mailto:mbraun@apple.com">mbraun@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 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;"><div><br class="Apple-interchange-newline">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 class="Apple-converted-space"> </span><span dir="ltr"><<a href="mailto:qcolombet@apple.com" target="_blank">qcolombet@apple.com</a>></span><span class="Apple-converted-space"> </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; position: static; z-index: auto;"><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; position: static; z-index: auto;"><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 class="Apple-converted-space"> </span><span style="white-space: pre-wrap;">       </span>str<span style="white-space: pre-wrap;">   </span>r0, [sp, #8]</div><div>+;CHECK-DAG:<span class="Apple-converted-space"> </span><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="Apple-converted-space"> </span><span class="" style="white-space: pre;">       </span>str<span class="" style="white-space: pre;">     </span>r0, [sp, #8]</div><div>;CHECK-DAG:<span class="Apple-converted-space"> </span><span class="" style="white-space: pre;">   </span>add<span class="" style="white-space: pre;">     </span>r0, sp, #8</div><div>;CHECK-DAG:<span class="Apple-converted-space"> </span><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 style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 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;"><br></div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 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;"><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></div></blockquote><div>I am not sure CHECK-DAG does want you think here.</div><div><br></div><div>Indeed, I made a quick test:</div><div>cat test.ll:</div><div><div>; CHECK-DAG: vmov.32 [[REG2:d[0-9]+]][0]</div><div>; CHECK-DAG: vmov.32 [[REG2]][1]</div><div><br></div><div>vmov.32 d0[1]</div><div>vmov.32 d0[0]</div><div><br></div><div>cat test.ll | FileCheck test.ll</div></div><div><br></div>And FileCheck does not complain on the order!</div><div><br><blockquote type="cite"><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 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;"><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></div></blockquote><div>Apparently not!</div><div>And in the case you want to check for the setting of lane in a register, this is useful (see my previous example).</div><div>So either it is a bug in your check or a bug in FileCheck!</div><br><blockquote type="cite"><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 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;"><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 style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 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;"><br></div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 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;">Updated patch is attached to my answer to Quentin.</div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 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;"><br></div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 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;">Thanks for the review,</div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 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;"><span class="Apple-tab-span" style="white-space: pre;">   </span>Matthias</div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 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;"><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></blockquote></div><br></div></body></html>