<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </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 --- - Inliner generates 'bitcast' instead of 'addrspacecast'"
   href="https://llvm.org/bugs/show_bug.cgi?id=25602">25602</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Inliner generates 'bitcast' instead of 'addrspacecast'
          </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>normal
          </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>zvi.rackover@intel.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=15330" name="attach_15330" title="Reproducer">attachment 15330</a> <a href="attachment.cgi?id=15330&action=edit" title="Reproducer">[details]</a></span>
Reproducer

To reproduce:
opt -inline -S < repro.ll

Output with debug flag on:
Args: opt -inline -S -debug
Inliner visiting SCC: bar: 0 call sites.
Inliner visiting SCC: foo: 1 call sites.
    Inlining: cost=always, Call:   %call = call <32 x i16> @bar(%S
addrspace(4)* byval %d)
    -> Deleting dead function: bar
CGSCCPASSMGR: Refreshing SCC with 1 nodes:
Call graph node for function: 'foo'<<0x60141d0>>  #uses=1

CGSCCPASSMGR: SCC Refresh didn't change call graph.
Invalid bitcast
  %lo.i = bitcast %S* %d1 to <32 x i16> addrspace(4)*
LLVM ERROR: Broken function found, compilation aborted!
------------------------------------------------------------

Seems like the Inliner is creating a 'bitcast' instead of an 'addrspacecast'.</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>