[all-commits] [llvm/llvm-project] b12930: [RISCV] Switch to using get.active.lane.mask when ...

Philip Reames via All-commits all-commits at lists.llvm.org
Fri Jul 8 10:25:18 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b12930e1338b3559e2b2376bd13bc600cceb5249
      https://github.com/llvm/llvm-project/commit/b12930e1338b3559e2b2376bd13bc600cceb5249
  Author: Philip Reames <preames at rivosinc.com>
  Date:   2022-07-08 (Fri, 08 Jul 2022)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h
    M llvm/test/Transforms/LoopVectorize/RISCV/low-trip-count.ll
    M llvm/test/Transforms/LoopVectorize/RISCV/scalable-tailfold.ll

  Log Message:
  -----------
  [RISCV] Switch to using get.active.lane.mask when tail folding

The motivation here is to a) bring us closer into alignment with AArch64 under the assumption that codepath is better tested, and b) simplify pattern matching in an upcoming change.

The immediate impact is a significant IR reduction but a fairly minimal change in the generated assembly. Due to a difference in expansion behavior we get a saturating add vs an unsaturating one for the old code, but that's about it. This difference comes down to different handling of overflow, which doesn't seem to be possible here anyways, so the assembly codegen is arguably a minor regression. I don't expect that to matter in practice.

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




More information about the All-commits mailing list