[PATCH] D154592: [X86] LowerTRUNCATE - improve handling during type legalization to PACKSS/PACKUS patterns

Phoebe Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 11 01:39:36 PDT 2023


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

LGTM.



================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:1242
     setOperationAction(ISD::TRUNCATE,    MVT::v4i16, Custom);
+    setOperationAction(ISD::TRUNCATE,    MVT::v4i32, Custom);
     setOperationAction(ISD::TRUNCATE,    MVT::v8i8,  Custom);
----------------
Why no `v2i64` and `v4i64`?


================
Comment at: llvm/test/CodeGen/X86/cast-vsel.ll:322
 ; SSE41-NEXT:    andps %xmm0, %xmm3
+; SSE41-NEXT:    psrld $31, %xmm4
 ; SSE41-NEXT:    movaps %xmm3, dj+4112(%rax)
----------------
This seems a little worse that `addps`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D154592



More information about the llvm-commits mailing list