<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 - opt -sroa -S produces code that the ll parser doesn't accept"
   href="https://bugs.llvm.org/show_bug.cgi?id=47363">47363</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>opt -sroa -S produces code that the ll parser doesn't accept
          </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>Linux
          </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>mikael.holmen@ericsson.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=23906" name="attach_23906" title="bbi-36469_x86.ll reproducer">attachment 23906</a> <a href="attachment.cgi?id=23906&action=edit" title="bbi-36469_x86.ll reproducer">[details]</a></span>
bbi-36469_x86.ll reproducer

Reproduce with:
 opt -sroa -o - bbi-36469_x86.ll -S | opt -S

Result:
 /data/repo/master/llvm/build-all/bin/opt: <stdin>:11:73: error: expected value
token
  call void @llvm.dbg.value(metadata <2 x { double, double }*> <{ double,
double }* inttoptr (i8 -1 to { double, double }*), { double, double }* inttoptr
(i8 -1 to { double, double }*)>, metadata !11, metadata
!DIExpression(DW_OP_LLVM_fragment, 8, 16)), !dbg !18
                                                                        ^
So the ll parser does not like the constant expressions in the dbg.value calls
that sroa produces.

If we instead run
 opt -sroa -o - bbi-36469_x86.ll | opt -S

it ends succesfully.</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>