[all-commits] [llvm/llvm-project] ba63cd: [RISCV] Store SEW in RISCV vector pseudo instructi...

Craig Topper via All-commits all-commits at lists.llvm.org
Sun May 2 12:13:21 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ba63cdb8f2a5d9ab511c4a58391163869d907110
      https://github.com/llvm/llvm-project/commit/ba63cdb8f2a5d9ab511c4a58391163869d907110
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2021-05-02 (Sun, 02 May 2021)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
    M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
    M llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
    M llvm/lib/Target/RISCV/RISCVInstrInfoVSDPatterns.td
    M llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
    M llvm/test/CodeGen/RISCV/rvv/add-vsetvli-gpr.mir
    M llvm/test/CodeGen/RISCV/rvv/add-vsetvli-vlmax.ll
    M llvm/test/CodeGen/RISCV/rvv/addi-scalable-offset.mir
    M llvm/test/CodeGen/RISCV/rvv/frameindex-addr.ll
    M llvm/test/CodeGen/RISCV/rvv/tail-agnostic-impdef-copy.mir

  Log Message:
  -----------
  [RISCV] Store SEW in RISCV vector pseudo instructions in log2 form.

This shrinks the immediate that isel table needs to emit for these
instructions. Hoping this allows me to change OPC_EmitInteger to
use a better variable length encoding for representing negative
numbers. Similar to what was done a few months ago for OPC_CheckInteger.

The alternative encoding uses less bytes for negative numbers, but
increases the number of bytes need to encode 64 which was a very
common number in the RISCV table due to SEW=64. By using Log2 this
becomes 6 and is no longer a problem.




More information about the All-commits mailing list