[llvm] [LoongArch] Custom legalize i32 operations for LA64 to reduce signed extensions (PR #93811)

Lu Weining via llvm-commits llvm-commits at lists.llvm.org
Fri May 31 01:00:20 PDT 2024


================
@@ -293,6 +295,7 @@ define i32 @add_i32_minus_0x80000000(i32 %x) {
 ; LA64-LABEL: add_i32_minus_0x80000000:
 ; LA64:       # %bb.0:
 ; LA64-NEXT:    addu16i.d $a0, $a0, -32768
+; LA64-NEXT:    addi.w $a0, $a0, 0
----------------
SixWeining wrote:

Is this necessary?

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


More information about the llvm-commits mailing list