<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 - [CostModel] Assertion "Vector argument does not match VF" failed."
   href="https://bugs.llvm.org/show_bug.cgi?id=49100">49100</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[CostModel]  Assertion "Vector argument does not match VF" 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>Scalar Optimizations
          </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=24498" name="attach_24498" title="reduced testcase">attachment 24498</a> <a href="attachment.cgi?id=24498&action=edit" title="reduced testcase">[details]</a></span>
reduced testcase

502a67d "[CostModel] Remove VF from IntrinsicCostAttributes" seems to be
causing the SystemZ build of the test-suite to fail
(SingleSource/UnitTests/matrix-types-spec.cpp).

getUserCost() is called with the instruction

%i6 = tail call <275 x double>
@llvm.matrix.multiply.v275f64.v475f64.v209f64(<475 x double> %i2, <209 x
double> undef, i32 25, i32 19, i32 11)

The return type is <275 x double>, but the argument type is <475 x double>. The
assertion in getOperandsScalarizationOverhead() is using VF==275, which is the
VF of the return type which does not match that of the argument...

opt -mtriple=s390x-linux-gnu -mcpu=z10 -O3 tc.ll -S -o -

llvm-project/llvm/include/llvm/CodeGen/BasicTTIImpl.h:630: unsigned int
llvm::BasicTTIImplBase<T>::getOperandsScalarizationOverhead(llvm::ArrayRef<const
llvm::Value*>, unsigned int) [with T = llvm::SystemZTTIImpl]: Asser
tion `(VF == 1 || VF == cast<FixedVectorType>(VecTy)->getNumElements()) &&
"Vector argument does not match VF"' failed.

#8 0x000000000210124a
llvm::BasicTTIImplBase<llvm::SystemZTTIImpl>::getOperandsScalarizationOverhead
#26 0x0000000003261fca llvm::InlinerPass::run</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>