[all-commits] [llvm/llvm-project] 3ed58d: AArch64: allocate small fixed args properly in var...

Tim Northover via All-commits all-commits at lists.llvm.org
Wed Jan 18 03:35:37 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3ed58d4df65e00b0ed3679551394f794170233d0
      https://github.com/llvm/llvm-project/commit/3ed58d4df65e00b0ed3679551394f794170233d0
  Author: Tim Northover <tnorthover at apple.com>
  Date:   2023-01-18 (Wed, 18 Jan 2023)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
    M llvm/lib/Target/AArch64/GISel/AArch64CallLowering.cpp
    A llvm/test/CodeGen/AArch64/varargs-fixed-i16.ll

  Log Message:
  -----------
  AArch64: allocate small fixed args properly in varargs functions.

On Darwin, function arguments occupy their real size when passed on the stack
(e.g. an i16 only consumes 2 bytes). This means that, even for fixed args in
varargs calls we need to keep track of the original type being passed before
any DAG/GISel promotions. Existing logic only applied this fix to the
non-varargs case leading to mismatch between caller & callee in those
situations.

On Linux & Windows these arguments always occupy a 64-bit slot anyway so
there's no special handling needed.




More information about the All-commits mailing list