<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - [ARM64] Inefficient range check sequence"
   href="http://llvm.org/bugs/show_bug.cgi?id=20927">20927</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[ARM64] Inefficient range check sequence
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Backend: AArch64
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>grosbach@apple.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Consider:
long foo(long a, long b, long v1, long v2) {
  if (a >= v1 && a < v2)
    return b;
  return 0;
}

We generate:
    cmp    x0, x2
    csinc    w8, wzr, wzr, lt
    cmp    x0, x3
    csinc    w9, wzr, wzr, ge
    and    w8, w8, w9
    cmp    w8, #0
    csel    x0, x1, xzr, ne
    ret

This seems like it should have generated something like:
  mov x4, #0
  cmp x0, x2
  ccmp x0, x3, #imm, lt
  csel x0, x1, x4, ge
  ret</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>