[all-commits] [llvm/llvm-project] dace82: AArch64: materialize large stack offset into xzr c...

Tim Northover via All-commits all-commits at lists.llvm.org
Mon Jun 1 02:00:24 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: dace8224f38a31636a02fe9c2af742222831f70c
      https://github.com/llvm/llvm-project/commit/dace8224f38a31636a02fe9c2af742222831f70c
  Author: Tim Northover <t.p.northover at gmail.com>
  Date:   2020-06-01 (Mon, 01 Jun 2020)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
    A llvm/test/CodeGen/AArch64/large-stack-cmp.ll

  Log Message:
  -----------
  AArch64: materialize large stack offset into xzr correctly.

When a stack offset was too big to materialize in a single instruction, we were
trying to do it in stages:

    adds xD, sp, #imm
    adds xD, xD, #imm

Unfortunately, if xD is xzr then the second instruction doesn't exist and
wouldn't do what was needed if it did. Instead we can use a temporary register
for all but the last addition.




More information about the All-commits mailing list