[PATCH] D128427: [LoongArch] Add codegen support for load/store operations

Lu Weining via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 1 20:51:35 PDT 2022


SixWeining added inline comments.


================
Comment at: llvm/test/CodeGen/LoongArch/ir-instruction/load-store.ll:329
+; LA64-NEXT:    lu12i.w $a1, -136485
+; LA64-NEXT:    ori $a1, $a1, 3823
+; LA64-NEXT:    lu32i.d $a1, -147729
----------------
xry111 wrote:
> Based on the previous discussion, should we move "ori" to the last instruction in the long immediate load sequence and change it to "addi.d" if possible, so a peephole optimization would be able to combine "addi.d" and "ld" into one instruction?
In terms of principle this can be implemented. But seems that this is only suitable for very few scenarios (maybe only when accessing a constant memory address). I'm not very sure.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128427/new/

https://reviews.llvm.org/D128427



More information about the llvm-commits mailing list