<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 - IndVars creates an invalid phi node after r367485"
   href="https://bugs.llvm.org/show_bug.cgi?id=45835">45835</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>IndVars creates an invalid phi node after r367485
          </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>Windows NT
          </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>dmajor@mozilla.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>efriedma@quicinc.com, florian_hahn@apple.com, froydnj@gmail.com, listmail@philipreames.com, llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Blocks</th>
          <td>45309
          </td>
        </tr></table>
      <p>
        <div>
        <pre><a href="https://godbolt.org/z/Me95yj">https://godbolt.org/z/Me95yj</a>

After r367485/llvmorg-10-init-991-gf8e7b536571, this phi node:
  %a.mux.lcssa4 = phi i8* [ %a.mux, %switch.early.test.i ], [ %a.mux,
%switch.early.test.i ], [ %a.mux, %cond.end ]

becomes
  %a.mux.lcssa4 = phi i8* [ %a.mux, %switch.early.test.i ], [ %scevgep,
%switch.early.test.i ], [ %scevgep, %cond.end ]

which has two different values for %switch.early.test.i.

This started out as an investigation of a clang hang in LICM (full repro
available on request) but this phi node is the first place that the verifier
started complaining, so I assume the rest is GIGO from there.

The bad phi is no longer seen after llvmorg-11-init-4213-gd6f47aeb519, but as
that is a cost model patch, I assume it's not really a fix but just an
avoidance.</pre>
        </div>
      </p>

        <div id="referenced">
          <hr style="border: 1px dashed #969696">
          <b>Referenced Bugs:</b>
          <ul>
              <li>
                [<a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [meta] 10.0.1 Release Blockers"
   href="https://bugs.llvm.org/show_bug.cgi?id=45309">Bug 45309</a>] [meta] 10.0.1 Release Blockers
              </li>
          </ul>
        </div>
        <br>

      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>