[PATCH] D122186: [RISCV] Special case sign extended scalars when type legalizing nxvXi64 .vx instrinsics on RV32.

Zakk Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 21 18:20:54 PDT 2022


khchen accepted this revision.
khchen added a comment.
This revision is now accepted and ready to land.

Thanks, LGTM!



================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:4625
 
   // If this is a sign-extended 32-bit constant, we can truncate it and rely
   // on the instruction to sign-extend since SEW>XLEN.
----------------
nit: Need to update comment.


================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:4751
   // We need to convert the scalar to a splat vector.
   // FIXME: Can we implicitly truncate the scalar if it is known to
   // be sign extended?
----------------
nit: Maybe we remove this FIXME comment now?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D122186



More information about the llvm-commits mailing list