[PATCH] D140319: [RISCV] Match neg (and x, 1) to two shifts to improve codesize
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 19 12:00:38 PST 2022
craig.topper added a comment.
No RV32 test coverage?
================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfo.td:1246
+def : Pat<(XLenVT (sub 0, (and_oneuse GPR:$rs, 1))),
+ (SRAI (SLLI $rs, (ImmSubFromXLen (XLenVT 1))), (ImmSubFromXLen (XLenVT 1)))>;
+}
----------------
Wrap this for 80 columns
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140319/new/
https://reviews.llvm.org/D140319
More information about the llvm-commits
mailing list