<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - LLVM 10 regression in comparison of gep inbounds difference"
   href="https://bugs.llvm.org/show_bug.cgi?id=44419">44419</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>LLVM 10 regression in comparison of gep inbounds difference
          </td>
        </tr>

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

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

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

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

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

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>Scalar Optimizations
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>nikita.ppv@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>define i1 @test([0 x i32]* nonnull %arg, i64 %arg1, i64 %arg2) {
  %tmp = getelementptr inbounds [0 x i32], [0 x i32]* %arg, i64 0, i64 0
  %tmp3 = getelementptr inbounds [0 x i32], [0 x i32]* %arg, i64 0, i64 %arg1
  %tmp6 = ptrtoint i32* %tmp3 to i64
  %tmp7 = ptrtoint i32* %tmp to i64
  %tmp8 = sub nuw i64 %tmp6, %tmp7
  %tmp9 = lshr exact i64 %tmp8, 2
  %tmp24 = icmp ugt i64 %tmp9, %arg2
  ret i1 %tmp24
}

opt -instcombine on LLVM 9:

define i1 @test([0 x i32]* nonnull %arg, i64 %arg1, i64 %arg2) {
  %tmp24 = icmp ugt i64 %arg1, %arg2
  ret i1 %tmp24
}

opt -instcombine on LLVM 10:

define i1 @test([0 x i32]* nonnull %arg, i64 %arg1, i64 %arg2) {
  %tmp3.idx = and i64 %arg1, 4611686018427387903
  %tmp24 = icmp ugt i64 %tmp3.idx, %arg2
  ret i1 %tmp24
}

Am I missing some subtlety here that prevents inbounds from implying that the
masking is unnecessary?</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>