[all-commits] [llvm/llvm-project] bbf3fd: [BasicTTI] Return Invalid for scalable vectors rea...

Philip Reames via All-commits all-commits at lists.llvm.org
Mon Jun 20 13:53:22 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bbf3fd4af1653693c7ada225c07cbd485ad1463c
  Author: Philip Reames <preames at rivosinc.com>
  Date:   2022-06-20 (Mon, 20 Jun 2022)

  Changed paths:
    M llvm/include/llvm/CodeGen/BasicTTIImpl.h

  Log Message:
  [BasicTTI] Return Invalid for scalable vectors reaching getScalarizationOverhead

If we would scalarize a fixed vector, we know we can't do so for a scalable one.  However, there's no need to crash, we can instead simply return a invalid cost which will work its way through the computation (since invalid is sticky), and the client should bail out.

Sorry for the lack of test here.  The particular codepath I saw this reached on was the result of another bug.

More information about the All-commits mailing list