[llvm] [LoongArch] Custom legalize i32 operations for LA64 to reduce signed extensions (PR #93811)
via llvm-commits
llvm-commits at lists.llvm.org
Fri May 31 01:21:00 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
----------------
heiher wrote:
No. Strictly speaking, for cases where sign extension is not needed, this is a regression. In fact, it probably isn't, since almost all scenarios on LoongArch64 involve sign extension?
https://github.com/llvm/llvm-project/pull/93811
More information about the llvm-commits
mailing list