[PATCH] D86906: [AArch64LdStOptimzation] fix a bug in AArch64 Load Store Optimization

Congzhe Cao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 10 14:45:32 PDT 2020


congzhe added inline comments.


================
Comment at: llvm/test/CodeGen/AArch64/aarch64-ldst-subsuperReg-no-ldp.mir:30
+
+  @m = common dso_local local_unnamed_addr global %struct.a zeroinitializer, align 1
+  @n = common dso_local local_unnamed_addr global i32 0, align 4
----------------
fhahn wrote:
> Is it possible to strip the IR references from the MIR test? Ideally most/all of the IR function here can be dropped.
I spent effort trying to drop out the IR, but since some global variables such as `@_MergedGlobals` or `@i` are used in the mir, if I were to drop the IR `llc` would report undefined global variables error. Is there a way that I can drop the IR while still being able to run the mir? @fhahn 


================
Comment at: llvm/test/CodeGen/AArch64/aarch64-ldst-subsuperReg-no-ldp.mir:187
+  bb.0.entry:
+    renamable $x8 = ADRP target-flags(aarch64-page) @o
+    renamable $w10 = LDRWui killed renamable $x8, target-flags(aarch64-pageoff, aarch64-nc) @o :: (dereferenceable load 4 from `i32* getelementptr inbounds ([1 x [8 x i32]], [1 x [8 x i32]]* @o, i64 0, i64 0, i64 0)`, !tbaa !2)
----------------
congzhe wrote:
> fhahn wrote:
> > Are all the loads/stores and the different BBs needed for the test? Also, are the different functions needed or do they test different scenarios?
> Thanks for the comment!
> The different functions do not test different scenarios. This is one single program (one single test) that exposes the bug, so probably all functions/BBs are still needed but I can try to reduce the program. I'm not very hopeful though because this test file is already a very much reduced version compared to its original version.
Now reduced the size of the test file, resulting in only one function in the mir which exposes the LDR-to-LDP-conversion bug.


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

https://reviews.llvm.org/D86906



More information about the llvm-commits mailing list