[PATCH] D98233: [RISCV] Improve legalization of i32 UADDO/USUBO on RV64.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 9 09:32:47 PST 2021


craig.topper added inline comments.


================
Comment at: llvm/test/CodeGen/RISCV/xaluo.ll:221
+; RV64-NEXT:    sltu a3, a3, a4
+; RV64-NEXT:    add a0, a0, a1
+; RV64-NEXT:    sw a0, 0(a2)
----------------
This add isn't needed. We could use the addw. I suspect this is SimplifyDemandedBits dropping the sign_extend_inreg on the store use. This causes isel to match sign_extend_inreg+add to addw for one path, but still leaving the add to be matched alone.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98233/new/

https://reviews.llvm.org/D98233



More information about the llvm-commits mailing list