<div class="gmail_extra"><div class="gmail_quote">On Thu, Sep 13, 2012 at 2:44 PM, Pranav Bhandarkar <span dir="ltr"><<a href="mailto:pranavb@codeaurora.org" target="_blank" class="cremed">pranavb@codeaurora.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">> Can you explain why you were unable to add a small unit test to the testsuite?<br>
<br>
</div>This is the case I have.<br>
<br>
******<br>
       r3 = memb(r1+#1)<br>
       r4 = memb(r1+ #0)<br>
      ..<br>
      ..<br>
      {<br>
        p0 = r3  /* Should almost never emit this. */<br>
        p1 = r4  /* Should almost never emit this. */<br>
     ..<br>
    ..<br>
       p0 = or(p1, p0)<br>
<br>
*****<br>
The CHECK tags I have are<br>
; CHECK: [[IntReg0:r[0-9]+]] = memb     //IntReg0 is r3<br>
; CHECK: [[IntReg1:r[0-9]+]] = memb    //IntReg1 is r4<br>
; CHECK-NOT: {{r[0-9]+}} = zxtb([[IntReg1]])   //Ensure no zxtb instructions exist between the loads and their uses.<br>
; CHECK-NOT: {{r[0-9]+}} = zxtb([[IntReg0]])<br>
; CHECK: [[PredReg0:p[0-3]+]] = [[IntReg0]]  // <--- [1]<br>
; CHECK: [[PredReg1:p[0-3]+]] = [[IntReg1]] // <---  [2]<br>
; CHECK: or([[PredReg1]], [[PredReg0]])<br>
<br>
When I was trying to write this testcase I had thought that if the order of [1] and [2] changed because of some change in the scheduler, the optimization (removal of zxtb) would still hold, but the changed order would cause a test failure.<br>

<br>
I do understand your point about using such things as checks for non-determinism in the code generator, but I would argue that this should be best left to the judgement of the test case writer.</blockquote><div><br></div>
<div>I'm really not understanding what is wrong with adding this now, and adding nice comments to it clarifying that these two things don't need to be in any particular order, and are just used to bound the CHECK-NOT above.</div>
<div><br></div><div>I mean, it's inconvenient, mostly for the person changing the scheduler, but provided there are helpful comments for them, I suspect they're not going to have a hard time updating the test cases. </div>
</div></div>