<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 - [AArch64] copy incorrectly erased and discard zero-extend operation"
   href="https://bugs.llvm.org/show_bug.cgi?id=48066">48066</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[AArch64] copy incorrectly erased and discard zero-extend operation
          </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>Linux
          </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>chengeng5@huawei.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>arnaud.degrandmaison@arm.com, llvm-bugs@lists.llvm.org, smithp352@googlemail.com, Ties.Stuij@arm.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>$ clang -O3 test-case.ll -w ;./a.out
c = -8917
$ clang -O0 test-case.ll -w ;./a.out
c = 4294958379


@b = dso_local local_unnamed_addr global { [3 x i8], i8, i8, i8, i8, i8 } { [3
x i8] undef, i8 -64, i8 74, i8 -9, i8 -1, i8 7 }, align 8
@c = common dso_local local_unnamed_addr global i64 0, align 8
@.str = private unnamed_addr constant [9 x i8] c"c = %ld\0A\00", align 1


define dso_local i8 @d(i64 %h) local_unnamed_addr {
entry:
  ret i8 undef
}

declare dso_local i32 @printf(i8* nocapture readonly, ...) local_unnamed_addr

define dso_local i32 @main() local_unnamed_addr {
entry:
  %bf.load = load i64, i64* bitcast ({ [3 x i8], i8, i8, i8, i8, i8 }* @b to
i64*), align 8
  %0 = lshr i64 %bf.load, 30
  %sext3 = shl nuw nsw i64 %0, 16
  %sext = trunc i64 %sext3 to i32
  %conv.i = ashr exact i32 %sext, 16
  %conv.i.i = zext i32 %conv.i to i64
  store i64 %conv.i.i, i64* @c, align 8
  %call.i.i = tail call i32 (i8*, ...) @printf(i8* nonnull dereferenceable(1)
getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i64
%conv.i.i)
  %call4.i = tail call i8 bitcast (i8 (i64)* @d to i8 (i32, i32)*)(i32 0, i32
%conv.i)
  ret i32 0
}</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>