[llvm] [LoongArch][ISel] Check the number of sign bits in `PatGprGpr_32` (PR #107432)

Lu Weining via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 6 06:00:40 PDT 2024


================
@@ -191,7 +191,8 @@ define signext i32 @sdiv_si32_ui32_ui32(i32 %a, i32 %b) {
 ; LA64:       # %bb.0: # %entry
 ; LA64-NEXT:    addi.w $a1, $a1, 0
 ; LA64-NEXT:    addi.w $a0, $a0, 0
-; LA64-NEXT:    div.w $a0, $a0, $a1
+; LA64-NEXT:    div.d $a0, $a0, $a1
----------------
SixWeining wrote:

Here we can use div.w because `$a0` and `$a1` are sign extend by `addi.w`. Seems it is a regress. @heiher, do you have any comments about this?

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


More information about the llvm-commits mailing list