<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:changpeng.fang@amd.com" title="Changpeng Fang <changpeng.fang@amd.com>"> <span class="fn">Changpeng Fang</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED - GVN incorrectly optimizes away a non-local load"
   href="https://bugs.llvm.org/show_bug.cgi?id=45470">bug 45470</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>INVALID
           </td>
           <td>---
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>RESOLVED
           </td>
           <td>REOPENED
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED - GVN incorrectly optimizes away a non-local load"
   href="https://bugs.llvm.org/show_bug.cgi?id=45470#c3">Comment # 3</a>
              on <a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED - GVN incorrectly optimizes away a non-local load"
   href="https://bugs.llvm.org/show_bug.cgi?id=45470">bug 45470</a>
              from <span class="vcard"><a class="email" href="mailto:changpeng.fang@amd.com" title="Changpeng Fang <changpeng.fang@amd.com>"> <span class="fn">Changpeng Fang</span></a>
</span></b>
        <pre>Thanks for looking into this. Right the reduced test does not reproduce the
issue. So I attached the original one extract.O1.ll:

We don't expect to see "chfang(float undef)" after
opt -O1 -gvn extraxt.O1.ll -S: 


bb1355:                                           ; preds = %bb1379, %bb1346
  %tmp1356 = phi i32 [ 0, %bb1346 ], [ %tmp1383, %bb1379 ]
  %tmp1357 = shl i32 %tmp1356, 2
  %tmp1358 = getelementptr inbounds [16 x i16], [16 x i16] addrspace(5)* %tmp,
i32 0, i32 %tmp1357
  store i16 11878, i16 addrspace(5)* %tmp1358, align 2, !tbaa !28
  ...


.loopexit:                                        ; preds = %.preheader,
%.loopexit93
  %tmp1394 = bitcast [16 x i16] addrspace(5)* %tmp to half addrspace(5)*
  %tmp1395 = load half, half addrspace(5)* %tmp1394, align 2, !tbaa !18
  %tmp1396 = fpext half %tmp1395 to float
  call void @chfang(float %tmp1396)</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>