[all-commits] [llvm/llvm-project] f73844: [RISCV] Generate bexti for (select(setcc eq (and x...

Yeting Kuo via All-commits all-commits at lists.llvm.org
Tue Nov 28 19:57:03 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f73844d92b36cb6801ac50ea721f4ba29b35d7a9
      https://github.com/llvm/llvm-project/commit/f73844d92b36cb6801ac50ea721f4ba29b35d7a9
  Author: Yeting Kuo <46629943+yetingk at users.noreply.github.com>
  Date:   2023-11-29 (Wed, 29 Nov 2023)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
    M llvm/test/CodeGen/RISCV/condops.ll

  Log Message:
  -----------
  [RISCV] Generate bexti for (select(setcc eq (and x, c))) where c is power of 2. (#73649)

Currently, llvm can transform (setcc ne (and x, c)) to (bexti x,
log2(c)) where c is power of 2.
This patch transform (select (setcc ne (and x, c)), T, F) into (select
(setcc eq (and x, c)), F, T).
It is benefit to the case c is not fit to 12-bits.




More information about the All-commits mailing list