[PATCH] D155917: [LoongArch] Add definition for LVZ/LBT instructions

WÁNG Xuěruì via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 21 00:02:34 PDT 2023


xen0n added a comment.

Thank you for the timely addition so we would be able to again ensure a consistent support baseline between binutils 2.41 and LLVM 17.

As for the LBT x86 assists at least, while we don't (currently) plan to leverage them in regular codegen (meaning the current modeling is kinda enough), it could be more accurate to additionally define the `X86FLAGS` register (or its correct official name if I remembered it wrong) so all the `NoDst` insns have their actual side effect properly accounted for. I don't yet know enough about the ARM assists to speak with confidence whether it's the same for those.



================
Comment at: llvm/lib/Target/LoongArch/LoongArchLBTInstrInfo.td:53-56
+def LDL_W : LOAD_2RI12<0x2e000000>;
+def LDR_W : LOAD_2RI12<0x2e400000>;
+def STL_W : STORE_2RI12<0x2f000000>;
+def STR_W : STORE_2RI12<0x2f400000>;
----------------
These should be marked mayLoad/Store accordingly.


================
Comment at: llvm/lib/Target/LoongArch/LoongArchLBTInstrInfo.td:191-194
+def LDL_D : LOAD_2RI12<0x2e800000>;
+def LDR_D : LOAD_2RI12<0x2ec00000>;
+def STL_D : STORE_2RI12<0x2f800000>;
+def STR_D : STORE_2RI12<0x2fc00000>;
----------------
Ditto.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D155917



More information about the llvm-commits mailing list