[all-commits] [llvm/llvm-project] 30a3a1: [NVPTX] Copy machine operand flags in TII::insertB...

Andrew Savonichev via All-commits all-commits at lists.llvm.org
Wed Nov 3 02:39:29 PDT 2021


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

  Changed paths:
    M llvm/lib/Target/NVPTX/NVPTXInstrInfo.cpp
    M llvm/test/CodeGen/NVPTX/branch-fold.ll
    A llvm/test/CodeGen/NVPTX/branch-fold.mir

  Log Message:
  -----------
  [NVPTX] Copy machine operand flags in TII::insertBranch

Before this patch, flags such as undef were dropped by TII::insertBranch
(used by BranchFolding pass), resulting in the following error from
machine verifier:

    *** Bad machine code: Reading virtual register without a def ***
    - function:    hoge
    - basic block: %bb.0 bb (0x562e9c240e68)
    - instruction: CBranch %2:int1regs, %bb.3
    - operand 0:   %2:int1regs

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




More information about the All-commits mailing list