<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 - NewGVN misses a load coercion opportunity"
   href="https://bugs.llvm.org/show_bug.cgi?id=34036">34036</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>NewGVN misses a load coercion opportunity
          </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>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>davide@freebsd.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>davide@freebsd.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dberlin@dberlin.org, filcab@gmail.com, llvm-bugs@lists.llvm.org, llvm-dev@redking.me.uk, simon.f.whittaker@gmail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>This is one of the blockers to get NewGVN on by default.
I'm going to look at this soon, opening a bug in case I get sidetracked in
other activities.

The gist is that we should remove the load sandwiched between the two stores,
and currently we don't.

; ModuleID = 'pr10820.ll'
source_filename = "pr10820.ll"
target datalayout =
"e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-f128:128:128-n8:16:32:64"
target triple = "x86_64-unknown-linux-gnu"

@g = external global i31

; Function Attrs: nounwind uwtable
define void @main() #0 {
entry:
  store i32 402662078, i32* bitcast (i31* @g to i32*), align 8
  %0 = load i31, i31* @g, align 8
  store i31 %0, i31* undef, align 1
  unreachable
}

attributes #0 = { nounwind uwtable }</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>