[all-commits] [llvm/llvm-project] b41e75: [RISCV][GISel] Make s32 a legal type for RV64 for ...

Craig Topper via All-commits all-commits at lists.llvm.org
Sat Aug 19 11:21:12 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b41e75c8a42256cca4305f534b88d1d13711e10e
      https://github.com/llvm/llvm-project/commit/b41e75c8a42256cca4305f534b88d1d13711e10e
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2023-08-19 (Sat, 19 Aug 2023)

  Changed paths:
    M llvm/lib/Target/RISCV/GISel/RISCVLegalizerInfo.cpp
    M llvm/test/CodeGen/RISCV/GlobalISel/legalizer/rv32/legalize-ashr.mir
    M llvm/test/CodeGen/RISCV/GlobalISel/legalizer/rv32/legalize-div.mir
    M llvm/test/CodeGen/RISCV/GlobalISel/legalizer/rv32/legalize-icmp.mir
    M llvm/test/CodeGen/RISCV/GlobalISel/legalizer/rv32/legalize-rem.mir
    M llvm/test/CodeGen/RISCV/GlobalISel/legalizer/rv64/legalize-add.mir
    M llvm/test/CodeGen/RISCV/GlobalISel/legalizer/rv64/legalize-ashr.mir
    M llvm/test/CodeGen/RISCV/GlobalISel/legalizer/rv64/legalize-const.mir
    M llvm/test/CodeGen/RISCV/GlobalISel/legalizer/rv64/legalize-div.mir
    M llvm/test/CodeGen/RISCV/GlobalISel/legalizer/rv64/legalize-icmp.mir
    M llvm/test/CodeGen/RISCV/GlobalISel/legalizer/rv64/legalize-load.mir
    M llvm/test/CodeGen/RISCV/GlobalISel/legalizer/rv64/legalize-lshr.mir
    M llvm/test/CodeGen/RISCV/GlobalISel/legalizer/rv64/legalize-mul-ext.mir
    M llvm/test/CodeGen/RISCV/GlobalISel/legalizer/rv64/legalize-rem.mir
    M llvm/test/CodeGen/RISCV/GlobalISel/legalizer/rv64/legalize-shl.mir
    M llvm/test/CodeGen/RISCV/GlobalISel/legalizer/rv64/legalize-store.mir
    M llvm/test/CodeGen/RISCV/GlobalISel/legalizer/rv64/legalize-sub.mir

  Log Message:
  -----------
  [RISCV][GISel] Make s32 a legal type for RV64 for any operation that has a W version.

My thought is that we can directly select W instructions using s32.

This will likely require combines and other optimizations eventually,
but this makes a simple starting point.

I'm slowly prototyping a similar approach for SelectionDAG.

Reviewed By: reames

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




More information about the All-commits mailing list