<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 - [ISel TypeLegalizer] Assertion `(isVector()) && "Invalid vector type!" ' failed."
   href="https://bugs.llvm.org/show_bug.cgi?id=47019">47019</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[ISel TypeLegalizer] Assertion `(isVector()) && "Invalid vector type!" ' failed.
          </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>Common Code Generator Code
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>paulsson@linux.vnet.ibm.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=23824" name="attach_23824" title="reduced testcase">attachment 23824</a> <a href="attachment.cgi?id=23824&action=edit" title="reduced testcase">[details]</a></span>
reduced testcase

Reduced test case:

llc -mtriple=s390x-linux-gnu -mcpu=z13 -O3 ./tc_invalid_vec_type.ll

Type legalization begins with:

SelectionDAG has 19 nodes:
  t0: ch = EntryToken
  t19: v8i32 = BUILD_VECTOR Constant:i32<6>, Constant:i32<6>, Constant:i32<6>,
Constant:i32<6>, Constant:i32<6>, Constan\
t:i32<6>, Constant:i32<6>, Constant:i32<6>
  t27: v8i32 = BUILD_VECTOR Constant:i32<0>, Constant:i32<0>, Constant:i32<0>,
Constant:i32<0>, Constant:i32<0>, Constan\
t:i32<0>, Constant:i32<0>, Constant:i32<0>
    t9: ch = store<(store 4 into `i32* getelementptr inbounds ([1 x [10 x [8 x
i32]]], [1 x [10 x [8 x i32]]]* @g_317, i\
64 0, i64 0, i64 9, i64 2)`)> t0, Constant:i32<0>, GlobalAddress:i64<[1 x [10 x
[8 x i32]]]* @g_317> + 296, undef:i64
              t23: v8i1 = setcc undef:v8i32, t19, setlt:ch
            t28: v8i32 = vselect t23, t27, t27
          t29: v8i32 = shl t19, t28
        t33: i32 = extract_vector_elt t29, Constant:i32<0>
      t44: i32 = sign_extend_inreg t33, ValueType:ch:i8
    t41: ch = store<(store 4 into `i32* getelementptr inbounds ([9 x i32], [9 x
i32]* @g_150, i64 0, i64 3)`)> t0, t44, \
GlobalAddress:i64<[9 x i32]* @g_150> + 12, undef:i64
  t42: ch = TokenFactor t9, t41

DAGTypeLegalizer::SplitRes_SELECT() is called on t28: v8i32 = vselect t23, t27,
t27. WidenVSELECTAndMask() is called, which calls DAG.getNode(ISD::VSELECT,
...),  which in turn calls simplifySelect(). Since T == F, T is returned, which
is t27. This node has a v8i32 type, and needs to be split. However
Res->getOperand(0) is passed, which is simnply a scalar i32 constant value.
This leads to the triggering of an assert in SplitVector().

It seems that a BUILD_VECTOR should not be split this way.</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>