[all-commits] [llvm/llvm-project] 2a3b6f: [RISCV] Hoist VSETVLI vlmax, vtype out of scalable...

Philip Reames via All-commits all-commits at lists.llvm.org
Wed May 25 08:10:29 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2a3b6f2cba92e884969a914917839242eb26809b
      https://github.com/llvm/llvm-project/commit/2a3b6f2cba92e884969a914917839242eb26809b
  Author: Philip Reames <preames at rivosinc.com>
  Date:   2022-05-25 (Wed, 25 May 2022)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
    M llvm/test/CodeGen/RISCV/rvv/sink-splat-operands.ll

  Log Message:
  -----------
  [RISCV] Hoist VSETVLI vlmax, vtype out of scalable loops

This is a straight forward extension of the PRE transform introduced in D124869 to handle the VLMAX case.

The test changes here look quite positive. This surprised me until I realized that all the tests are using @llvm.vscale to figure out the VLMAX, not the llvm.riscv.vsetvlmax intrinsic. If they'd used the later, these would have been full redundancy cases and fully handled by the data flow. I'm not really sure if use of vscale here is representative or not. If it is, we should probably look at using VSETVLI to lower vscale rather than a raw read of vlenb and some math.

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




More information about the All-commits mailing list