[all-commits] [llvm/llvm-project] 514481: [RISCV] Add isel optimization for (and (sra y, c2)...
Craig Topper via All-commits
all-commits at lists.llvm.org
Tue Aug 20 09:42:09 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 514481736cf943464125ef34570a7df0a19290de
https://github.com/llvm/llvm-project/commit/514481736cf943464125ef34570a7df0a19290de
Author: Craig Topper <craig.topper at sifive.com>
Date: 2024-08-20 (Tue, 20 Aug 2024)
Changed paths:
M llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
M llvm/test/CodeGen/RISCV/rv64zba.ll
Log Message:
-----------
[RISCV] Add isel optimization for (and (sra y, c2), c1) to recover regression from #101751. (#104114)
If c1 is a shifted mask with c3 leading zeros and c4 trailing zeros. If
c2 is greater than c3, we can use (srli (srai y, c2 - c3), c3 + c4)
followed by a SHXADD with c4 as the X amount.
Without Zba we can use (slli (srli (srai y, c2 - c3), c3 + c4), c4).
Alive2: https://alive2.llvm.org/ce/z/AwhheR
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