[PATCH] D89693: [AArch64] Favor post-increments and implement TTI::getPreferredAddressingMode

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 24 03:15:19 PST 2021


dmgreen added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:1293
+
+  // Find unrolled loops and pointers with multiple uses within the loop.
+  DenseMap<Value *, unsigned> NumPointerUses;
----------------
I'm not sure I understand this logic. Won't it detect many things that are not unrolled loops? Why does it start at 0?

I think it's worth added a few deliberate tests for the different cases this is trying to optimize. Some for simple loops, more complex unrolled loops and vectorized/interleaved loops. Showing how the codegen has changed now that we change this default option.


================
Comment at: llvm/test/CodeGen/AArch64/vldn_shuffle.ll:2
 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
-; RUN: llc < %s -mtriple=aarch64-none-eabif | FileCheck %s
+; RUN: llc < %s -mtriple=aarch64-none-eabif -lsr-preferred-addressing-mode=none | FileCheck %s --check-prefix=CHECK
+; RUN: llc < %s -mtriple=aarch64-none-eabif | FileCheck %s --check-prefix=POSTINDEXED
----------------
I don't think we should be adding this to unrelated tests if we can help it. For tests like this that are testing something else, it's OK to just check the default.

Same for all the other tests. From what I can tell they seem the same or better?


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

https://reviews.llvm.org/D89693



More information about the llvm-commits mailing list