[PATCH] D142456: [AArch64] cost mode.

hassnaaHamdi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 24 05:06:04 PST 2023


hassnaa-arm created this revision.
hassnaa-arm added a reviewer: sdesmalen.
Herald added subscribers: hiraditya, kristof.beyls.
Herald added a project: All.
hassnaa-arm requested review of this revision.
Herald added subscribers: llvm-commits, alextsao1999.
Herald added a project: LLVM.

Add high cost for extending to illegal scalable vector types


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D142456

Files:
  llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp


Index: llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
===================================================================
--- llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
+++ llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
@@ -2059,6 +2059,15 @@
     { ISD::BITCAST, MVT::nxv2i16, MVT::nxv2f16, 0 },
     { ISD::BITCAST, MVT::nxv4i16, MVT::nxv4f16, 0 },
     { ISD::BITCAST, MVT::nxv2i32, MVT::nxv2f32, 0 },
+
+    // Add high cost for extending to illegal -too widen- scalable vectors.
+    { ISD::ZERO_EXTEND, MVT::nxv16i16, MVT::nxv16i8, 16},
+    { ISD::ZERO_EXTEND, MVT::nxv16i32, MVT::nxv16i8, 32},
+    { ISD::ZERO_EXTEND, MVT::nxv16i64, MVT::nxv16i8, 64},
+
+    { ISD::SIGN_EXTEND, MVT::nxv16i16, MVT::nxv16i8, 16},
+    { ISD::SIGN_EXTEND, MVT::nxv16i32, MVT::nxv16i8, 32},
+    { ISD::SIGN_EXTEND, MVT::nxv16i64, MVT::nxv16i8, 64},
   };
 
   if (const auto *Entry = ConvertCostTableLookup(ConversionTbl, ISD,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142456.491721.patch
Type: text/x-patch
Size: 946 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230124/a160807c/attachment.bin>


More information about the llvm-commits mailing list