[all-commits] [llvm/llvm-project] e2f410: [RISCV] Add test cases showing failure to remove m...

Craig Topper via All-commits all-commits at lists.llvm.org
Wed May 18 10:24:44 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e2f410feeab27a8bb2c015fc02bb8527702e401f
      https://github.com/llvm/llvm-project/commit/e2f410feeab27a8bb2c015fc02bb8527702e401f
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2022-05-18 (Wed, 18 May 2022)

  Changed paths:
    M llvm/test/CodeGen/RISCV/rotl-rotr.ll

  Log Message:
  -----------
  [RISCV] Add test cases showing failure to remove mask on rotate amounts.

If the masking AND has multiple users we fail to remove it.


  Commit: 86f7d7074a0129955aa2f5c82fe8c383eb17a35a
      https://github.com/llvm/llvm-project/commit/86f7d7074a0129955aa2f5c82fe8c383eb17a35a
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2022-05-18 (Wed, 18 May 2022)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVInstrInfoZb.td
    M llvm/test/CodeGen/RISCV/rotl-rotr.ll

  Log Message:
  -----------
  [RISCV] Use selectShiftMaskXLen ComplexPattern for isel of rotates.

This will remove masks on the shift amount. We usually get this with
SimplifyDemandedBits in DAGCombine, but that's restricted to cases
where the AND has a single use. selectShiftMaskXLen does not have
that restriction.


Compare: https://github.com/llvm/llvm-project/compare/4957518ef57f...86f7d7074a01


More information about the All-commits mailing list