<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 - [full restrict] Assertion `isAllocaPromotable(AI)`"
   href="https://bugs.llvm.org/show_bug.cgi?id=51679">51679</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[full restrict] Assertion `isAllocaPromotable(AI)`
          </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>Transformation Utilities
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>alina.sbirlea@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=25202" name="attach_25202" title="Testcase">attachment 25202</a> <a href="attachment.cgi?id=25202&action=edit" title="Testcase">[details]</a></span>
Testcase

With the full restrict support patches, I'm seeing the following assertion: 
llvm-project/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp:911: void
(anonymous namespace)::PromoteMem2Reg::run(): Assertion `isAllocaPromotable(AI)
&& "Cannot promote non-promotable alloca!"' failed.

To reproduce:
opt -sroa reduced10_sroa.ll



Partial trace:

#11 0x0000000008077cfa llvm::PromoteMemToReg(llvm::ArrayRef<llvm::AllocaInst*>,
llvm::DominatorTree&, llvm::AssumptionCache*)
llvm-project/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp:1373:3
#12 0x0000000007d16c94 llvm::SROA::promoteAllocas(llvm::Function&)
llvm-project/llvm/lib/Transforms/Scalar/SROA.cpp:5564:3
#13 0x0000000007d1700d llvm::SROA::runImpl(llvm::Function&,
llvm::DominatorTree&, llvm::AssumptionCache&)
llvm-project/llvm/lib/Transforms/Scalar/SROA.cpp:5610:16</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>