[llvm] [RISCV] Add +optimized-nfN-segment-load-store (PR #114414)

Pengcheng Wang via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 31 20:22:04 PDT 2024


================
@@ -716,6 +716,28 @@ RISCVTTIImpl::getMaskedMemoryOpCost(unsigned Opcode, Type *Src, Align Alignment,
   return getMemoryOpCost(Opcode, Src, Alignment, AddressSpace, CostKind);
 }
 
+static bool hasOptimizedSegmentLoadStore(unsigned NF,
+                                         const RISCVSubtarget *ST) {
+  switch (NF) {
+  case 2:
----------------
wangpc-pp wrote:

Save some lines via using macros?

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


More information about the llvm-commits mailing list