[PATCH] D34337: [PPC] Fix two bugs in frame lowering.

Kit Barton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 10 09:15:35 PDT 2017


kbarton accepted this revision.
kbarton added a comment.

LGTM. Just some minor updates in the comments.



================
Comment at: lib/Target/PowerPC/PPCSubtarget.h:277
+  // DarwinABI has a 224-byte red zone. PPC32 Non-DarwinABI (SVR4ABI) has no
+  // red zone and PPC64 Non-DarwinABI has a 288-byte red zone.
+  unsigned  getRedZoneSize() const {
----------------
Please change the Non-DarwinABI to SVR4ABI.



================
Comment at: test/CodeGen/PowerPC/ppc-redzone-alignment-bug.ll:2
+; Note the formula for negative number alignment calculation should be y = x & ~(n-1) rather than y = (x + (n-1)) & ~(n-1).
+; after fixing this issue, we could save 16 bytes in the best case.
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr8 < %s | FileCheck %s -check-prefix=CHECK-BE
----------------
Can you please replace "this issue" with the specific Review that is being fixed?


================
Comment at: test/CodeGen/PowerPC/ppc-redzone-alignment-bug.ll:10
+  ret i32 %0
+; Before the fix:
+; stdu 1, -544(1)
----------------
Again, instead of "the fix" specify the review this is being done under. 


https://reviews.llvm.org/D34337





More information about the llvm-commits mailing list