[PATCH] D122212: [RISCV] Add alias to pack/packw

LiqinWeng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 22 18:46:40 PDT 2022


Miss_Grape added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfoZb.td:654
+let Predicates = [HasStdExtZbpOrZbkb, IsRV32] in {
+def : InstAlias<"zext.h $rd, $rs", (PACK GPR:$rd, GPR:$rs, X0), 0>;
+}
----------------
benshi001 wrote:
> benshi001 wrote:
> > We need not such aliases, since there is real zext.h instruction.
> We need not two `zext.h`, maybe just one is OK, when ZBB is invalid.
real MI is PACK and PACKW,so just need Predicates = HasStdExtZbpOrZbkb


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D122212



More information about the llvm-commits mailing list