[all-commits] [llvm/llvm-project] 32622d: [RISCV] Add isel pattern for (mul (and X, 0xffffff...
Craig Topper via All-commits
all-commits at lists.llvm.org
Wed Jul 27 09:45:21 PDT 2022
Author: Craig Topper <craig.topper at sifive.com>
Date: 2022-07-27 (Wed, 27 Jul 2022)
[RISCV] Add isel pattern for (mul (and X, 0xffffffff), 3<<C) with Zba.
We can use slli.uw by C followed by sh1add. Similar can be done
for multiples of 5 and 9. We need to make sure that C is less than
32 to stay in bounds of the 5-bit immediate for slli.uw.
We have existing patterns for (mul X, 3<<C) that use sh1add
followed by slli. That order doesn't allow the and to be folded.
Reviewed By: reames
Differential Revision: https://reviews.llvm.org/D130146
More information about the All-commits