[llvm] [RISCV] Enable expansion mul expansion to shNadd x, (slli x, c) (PR #87105)
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 11 15:15:00 PDT 2024
================
@@ -561,8 +562,8 @@ define i64 @add_mul_combine_infinite_loop(i64 %x) {
; RV64IMB: # %bb.0:
; RV64IMB-NEXT: addi a0, a0, 86
; RV64IMB-NEXT: sh1add a0, a0, a0
-; RV64IMB-NEXT: li a1, -16
-; RV64IMB-NEXT: sh3add a0, a0, a1
+; RV64IMB-NEXT: slli a0, a0, 3
----------------
preames wrote:
This looks to be the result of transformAddImmMulImm. I agree that looks like a questionable transform.
https://github.com/llvm/llvm-project/pull/87105
More information about the llvm-commits
mailing list