[PATCH] D69018: [AArch64] Fix offset calculation

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 16 10:09:46 PDT 2019


sdesmalen added inline comments.


================
Comment at: llvm/test/CodeGen/AArch64/framelayout-large-offset.mir:1
+# RUN: llc -mtriple=aarch64-none-linux-gnu %s -o -
+---
----------------
nit: I would probably add `-run-pass=prologepilog`, to reduce possible interference from other passes.


================
Comment at: llvm/test/CodeGen/AArch64/framelayout-large-offset.mir:14
+# CHECK:              sub     x8, sp, #4095, lsl #12
+# CHECK-NEXT:         sub     x8, x8, #4095, lsl #12
+# CHECK-NEXT:         sub     x8, x8, #4095, lsl #12
----------------
Sorry I didn't notice this earlier when I posted the example MIR, but these `sub`s are wrong. The offset is at a positive distance from the SP, so it should use `add` here. If I change the offset from `2147483648` to `2147483632` that changes. So I expect some other changes are needed to fix this.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69018





More information about the llvm-commits mailing list