<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 - InstCombine: stacksaverestore.ll looks different with debug info present"
   href="https://bugs.llvm.org/show_bug.cgi?id=37713">37713</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>InstCombine: stacksaverestore.ll looks different with debug info present
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </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>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>vsk@apple.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Running `opt -O1` on stacksaverestore.ll produces different output with/without
debug info present. To reproduce the issue, do:

# Baseline
$ $OPT -O1 test/Transforms/InstCombine/stacksaverestore.ll -S -o -

# With debug info
$ $OPT -O1 test/Transforms/InstCombine/stacksaverestore.ll -o - -debugify-each
-debugify-quiet | $OPT -strip -S

Comparing: -O1 test/Transforms/InstCombine/stacksaverestore.ll
  Baseline: /var/folders/j8/t4w0bp8j6x1g6fpghkcb4sjm0000gp/T/tmp.P2vczKKB
  With DI : /var/folders/j8/t4w0bp8j6x1g6fpghkcb4sjm0000gp/T/tmp.pcByPNQ1
12,16c12,18
< ; Function Attrs: norecurse nounwind readnone
< define noalias nonnull i32* @test1(i32) local_unnamed_addr #1 {
<   %2 = zext i32 %0 to i64
<   %3 = alloca i32, i64 %2, align 4
<   ret i32* %3
---
<span class="quote">> ; Function Attrs: nounwind
> define noalias nonnull i32* @test1(i32) local_unnamed_addr #0 {
>   %2 = tail call i8* @llvm.stacksave()
>   tail call void @llvm.stackrestore(i8* %2)
>   %3 = zext i32 %0 to i64
>   %4 = alloca i32, i64 %3, align 4
>   ret i32* %4</span >
:: Found a test case ^</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>