[llvm] [NVPTX] Make i16x2 a native type and add supported vec instructions (PR #65432)

Artem Belevich via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 6 11:52:27 PDT 2023


================
@@ -2515,13 +2586,13 @@ SDValue NVPTXTargetLowering::LowerSTORE(SDValue Op, SelectionDAG &DAG) const {
 
   // v2f16 is legal, so we can't rely on legalizer to handle unaligned
   // stores and have to handle it here.
-  if (Isv2f16Orv2bf16Type(VT) &&
+  if (Isv2f16Orv2bf16Orv2i16Type(VT) &&
       !allowsMemoryAccessForAlignment(*DAG.getContext(), DAG.getDataLayout(),
                                       VT, *Store->getMemOperand()))
     return expandUnalignedStore(Store, DAG);
 
-  // v2f16 and v2bf16 don't need special handling.
-  if (VT == MVT::v2f16 || VT == MVT::v2bf16)
+  // v2f16, v2bf16 and v2i16 don't need special handling.
+  if (VT == MVT::v2f16 || VT == MVT::v2bf16 || VT == MVT::v2i16)
----------------
Artem-B wrote:

Use Isv2f16Orv2bf16Orv2i16Type() ?

https://github.com/llvm/llvm-project/pull/65432


More information about the llvm-commits mailing list