<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 --- - Legalization code assumes only integer typed ops may need expanding"
   href="https://llvm.org/bugs/show_bug.cgi?id=30715">30715</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Legalization code assumes only integer typed ops may need expanding
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>3.9
          </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>Common Code Generator Code
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>nemanja.i.ibm@gmail.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=17456" name="attach_17456" title="Test case that causes the failure">attachment 17456</a> <a href="attachment.cgi?id=17456&action=edit" title="Test case that causes the failure">[details]</a></span>
Test case that causes the failure

When a floating point type needs to be legalized by expanding, the code in
DAGTypeLegalizer::ExpandOp_BITCAST causes an assert in
DAGTypeLegalizer::IntegerToVector to trip because it assumes that the input
operand is integral. But there is a type that may need to be legalized by
expanding (namely ppcf128 is a pair of doubles).

To reproduce:
llc < legalize-bug.ll 
    .text
    .abiversion 2
    .file    "<stdin>"
llc:
/home/nemanjai/llvm/llvm-clean/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp:321:
void llvm::DAGTypeLegalizer::IntegerToVector(llvm::SDValue, unsigned int,
llvm::SmallVectorImpl<llvm::SDValue>&, llvm::EVT): Assertion
`Op.getValueType().isInteger()' failed.
<... rest of stack trace omitted for brevity ...></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>