[PATCH] D101244: [RISCV] Optimize addition with immediate
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 24 23:04:36 PDT 2021
craig.topper added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfo.td:1303
+def sextOneUseAddi32 : PatFrag<(ops node:$A, node:$B),
+ (sext_inreg (add node:$A, node:$B), i32), [{
----------------
I think the more common way to do this is to have to have an "add_oneuse" PatFrag that call N->hasOneUse()
See and_su, xor_su, fmul_su in ARMInstrInfo.td or and_su, srl_su, trunc_su in X86/X86InstrInfo.td. _su in all of those stands for "single use", but "_oneuse" is more readable
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101244/new/
https://reviews.llvm.org/D101244
More information about the llvm-commits
mailing list