[all-commits] [llvm/llvm-project] 7e8152: [RISCV] Optimize immediate materialisation with BS...

Ben Shi via All-commits all-commits at lists.llvm.org
Wed Oct 13 21:57:19 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7e815261267727b1a7138e7135225c482541c677
      https://github.com/llvm/llvm-project/commit/7e815261267727b1a7138e7135225c482541c677
  Author: Ben Shi <powerman1st at 163.com>
  Date:   2021-10-14 (Thu, 14 Oct 2021)

  Changed paths:
    M llvm/lib/Target/RISCV/MCTargetDesc/RISCVMatInt.cpp
    M llvm/test/CodeGen/RISCV/imm.ll
    M llvm/test/MC/RISCV/rv64zbs-aliases-valid.s

  Log Message:
  -----------
  [RISCV] Optimize immediate materialisation with BSETI/BCLRI

Opitimize immediate materialisation in the following way if profitable:
1. Use BCLRI for upper 32 bits if the lower 32 bits are negative int32.
2. Use BSETI for upper 32 bits if the lower 32 bits are positive int32.

Reviewed By: craig.topper

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




More information about the All-commits mailing list