[PATCH] D84308: [PowerPC] Retrieve the offset from load/store if it stores to stack slots

Jinsong Ji via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 28 14:16:17 PDT 2020


jsji accepted this revision as: jsji.
jsji added a comment.
This revision is now accepted and ready to land.

LGTM, but please update the testcases carefully, especially regarding DAG. -- Unnecessary DAG will hide bugs .



================
Comment at: llvm/test/CodeGen/PowerPC/aix-cc-byval.ll:759
 ; 32BIT-NEXT:   liveins: $r3, $r4, $r5, $r6, $r7, $r8, $r9, $r10
+; 32BIT-DAG:    STW killed renamable $r8,  20, %fixed-stack.0 :: (store 4 into %fixed-stack.0 + 20
 ; 32BIT-DAG:    STW killed renamable $r3,   0, %fixed-stack.0 :: (store 4 into %fixed-stack.0
----------------
Nit: this shouldn't be DAG -- STW 20 should be before others because of following overlapped LBZ.


================
Comment at: llvm/test/CodeGen/PowerPC/aix-cc-byval.ll:777
 ; 64BIT-DAG:    STD killed renamable $x3, 0, %fixed-stack.0 :: (store 8 into %fixed-stack.0
-; 64BIT-DAG:    STD killed renamable $x4, 8, %fixed-stack.0 :: (store 8 into %fixed-stack.0 + 8
 ; 64BIT-DAG:    STD killed renamable $x5, 16, %fixed-stack.0 :: (store 8 into %fixed-stack.0 + 16
 ; 64BIT-NEXT:   renamable $x3 = LBZ8 21, %fixed-stack.0 :: (dereferenceable load 1
----------------
This should not be DAG as well. `STD killed renamable $x5, 16` should be before `STD killed renamable $x3,0` because of  dependent LBZ8.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D84308



More information about the llvm-commits mailing list