[all-commits] [llvm/llvm-project] 0e7078: [NVPTX] Add MoveParam instruction for TargetExtern...

Andrew Savonichev via All-commits all-commits at lists.llvm.org
Wed Nov 3 04:44:31 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0e707855386f6bbd5f4705bd525ad78537e43875
      https://github.com/llvm/llvm-project/commit/0e707855386f6bbd5f4705bd525ad78537e43875
  Author: Andrew Savonichev <andrew.savonichev at gmail.com>
  Date:   2021-11-03 (Wed, 03 Nov 2021)

  Changed paths:
    M llvm/lib/Target/NVPTX/NVPTXInstrInfo.td
    M llvm/test/CodeGen/NVPTX/lower-byval-args.ll

  Log Message:
  -----------
  [NVPTX] Add MoveParam instruction for TargetExternalSymbol operand

TargetExternalSymbol is considered to be an immediate and not a
register, so machine verifier emits an error:

    *** Bad machine code: Expected a register operand. ***
    - function:    static_offset
    - basic block: %bb.0 bb (0x560e9b306028)
    - instruction: %3:int64regs = MoveParamI64 &static_offset_param_1
    - operand 1:   &static_offset_param_1

The patch adds variants of this instruction with an immediate operand
for byval arguments on 64-bit and 32-bit targets.

Differential Revision: https://reviews.llvm.org/D113006




More information about the All-commits mailing list