[all-commits] [llvm/llvm-project] eabf11: [CodeGenPrepare] Avoid a scalable-vector crash in ...

Fraser Cormack via All-commits all-commits at lists.llvm.org
Wed Oct 20 08:54:48 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: eabf11f9ea8d647d78e455664658b4faf8880029
      https://github.com/llvm/llvm-project/commit/eabf11f9ea8d647d78e455664658b4faf8880029
  Author: Fraser Cormack <fraser at codeplay.com>
  Date:   2021-10-20 (Wed, 20 Oct 2021)

  Changed paths:
    M llvm/lib/CodeGen/CodeGenPrepare.cpp
    A llvm/test/Transforms/CodeGenPrepare/RISCV/cttz-ctlz.ll
    A llvm/test/Transforms/CodeGenPrepare/RISCV/lit.local.cfg

  Log Message:
  -----------
  [CodeGenPrepare] Avoid a scalable-vector crash in ctlz/cttz

This patch fixes a crash when despeculating ctlz/cttz intrinsics with
scalable-vector types. It is not safe to speculatively get the size of
the vector type in bits in case the vector type is not a fixed-length type. As
it happens this isn't required as vector types are skipped anyway.

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D112141




More information about the All-commits mailing list