[all-commits] [llvm/llvm-project] 05a237: [RISCV][GlobalISel] Lower i8 bitreverse using brev...

Bogdan Vetrenko via All-commits all-commits at lists.llvm.org
Tue May 26 05:51:40 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 05a237293730ce2e83718037d7addabd6c15b238
      https://github.com/llvm/llvm-project/commit/05a237293730ce2e83718037d7addabd6c15b238
  Author: Bogdan Vetrenko <b.vetrenko at yandex.ru>
  Date:   2026-05-26 (Tue, 26 May 2026)

  Changed paths:
    M llvm/lib/Target/RISCV/GISel/RISCVLegalizerInfo.cpp
    M llvm/lib/Target/RISCV/GISel/RISCVLegalizerInfo.h
    M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
    M llvm/lib/Target/RISCV/RISCVISelLowering.h
    M llvm/lib/Target/RISCV/RISCVInstrGISel.td
    A llvm/test/CodeGen/RISCV/GlobalISel/bitreverse-zbkb.ll

  Log Message:
  -----------
  [RISCV][GlobalISel] Lower i8 bitreverse using brev8 with Zbkb (#199469)

This teaches RISC-V GlobalISel to custom-lower scalar i8 G_BITREVERSE
using brev8 when Zbkb is available.

The i8 source is zero-extended to XLEN before applying the riscv_brev8
intrinsic. Since brev8 reverses bits independently within each byte, the
high zero bytes remain zero, so the result can be truncated back to i8.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list