[llvm] [RISCV][GISel] Remove s32 support on RV64 for DIV, and REM. (PR #102519)

Michael Maitland via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 14 10:31:32 PDT 2024


================
@@ -348,7 +348,9 @@ define i32 @sdiv_i32(i32 %a, i32 %b) {
 ;
 ; RV64IM-LABEL: sdiv_i32:
 ; RV64IM:       # %bb.0: # %entry
-; RV64IM-NEXT:    divw a0, a0, a1
+; RV64IM-NEXT:    sext.w a0, a0
+; RV64IM-NEXT:    sext.w a1, a1
+; RV64IM-NEXT:    div a0, a0, a1
----------------
michaelmaitland wrote:

What if we look at it during custom legalization?

https://github.com/llvm/llvm-project/pull/102519


More information about the llvm-commits mailing list