[all-commits] [llvm/llvm-project] 4c92e3: [RISCV] Add tests for __builtin_parity idiom.

Craig Topper via All-commits all-commits at lists.llvm.org
Sun Jun 27 12:38:10 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4c92e31dd0f1bd152eda883af20ff7fbcaa14945
      https://github.com/llvm/llvm-project/commit/4c92e31dd0f1bd152eda883af20ff7fbcaa14945
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2021-06-27 (Sun, 27 Jun 2021)

  Changed paths:
    M llvm/test/CodeGen/RISCV/bswap-ctlz-cttz-ctpop.ll

  Log Message:
  -----------
  [RISCV] Add tests for __builtin_parity idiom.

We use (and (ctpop X), 1) to represent parity.

The generated code for i32 parity on RV64 has more instructions than
necessary which I hope to improve in a followup patch.

Also add missing test for i64 ctpop.




More information about the All-commits mailing list