[all-commits] [llvm/llvm-project] 123ad7: [NVPTX] Mark special registers as reserved

Andrew Savonichev via All-commits all-commits at lists.llvm.org
Wed Nov 3 05:49:20 PDT 2021


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

  Changed paths:
    M llvm/lib/Target/NVPTX/NVPTXRegisterInfo.cpp
    M llvm/test/CodeGen/NVPTX/envreg.ll

  Log Message:
  -----------
  [NVPTX] Mark special registers as reserved

A reserved register:
 - is not allocatable
 - is considered always live
 - is ignored by liveness tracking

NVPTX special registers match the criteria, and marking them as
reserved helps to avoid machine verifier error:

    *** Bad machine code: Using an undefined physical register ***
    - function:    foo
    - basic block: %bb.0  (0x557bb178b708)
    - instruction: %0:int32regs = MOV_SPECIAL $envreg0
    - operand 1:   $envreg0

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




More information about the All-commits mailing list