[llvm] [RISCV][GISel] Remove s32 support on RV64 for DIV, and REM. (PR #102519)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 14 10:33:59 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
----------------
topperc wrote:
> Edit: I think thats what you mean by custom W nodes?
Yes. In order to do something during custom legalization we would need to convert it to a custom opcode.
https://github.com/llvm/llvm-project/pull/102519
More information about the llvm-commits
mailing list