[all-commits] [llvm/llvm-project] 0c1326: [BasicTTI] Avoid crash when costing scalable selec...

Philip Reames via All-commits all-commits at lists.llvm.org
Thu Jun 23 09:15:15 PDT 2022

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

  Changed paths:
    M llvm/include/llvm/CodeGen/BasicTTIImpl.h
    A llvm/test/Analysis/CostModel/RISCV/rvv-select.ll

  Log Message:
  [BasicTTI] Avoid crash when costing scalable select expansion

If the target has chosen to expand a scalable vector type, BasicTTI tries to scalarize and we'd crash.  As a minimum, we should return an invalid cost instead.

The added test provide coverage for the moment, but given they show a number of gaps in RISCV costing, they're likely not to cover this code path long term.

More information about the All-commits mailing list