[all-commits] [llvm/llvm-project] 410948: [PHIElimination] Pre-commit a test case for D110834

Jay Foad via All-commits all-commits at lists.llvm.org
Thu Oct 7 12:04:55 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 41094830134092daf07dc3fa4715b2bc439c2dde
      https://github.com/llvm/llvm-project/commit/41094830134092daf07dc3fa4715b2bc439c2dde
  Author: Jay Foad <jay.foad at amd.com>
  Date:   2021-10-07 (Thu, 07 Oct 2021)

  Changed paths:
    M llvm/test/CodeGen/X86/callbr-asm-kill.mir

  Log Message:
  -----------
  [PHIElimination] Pre-commit a test case for D110834


  Commit: 3c9dfba1894c6bceba0e087a8bd84212fd231d34
      https://github.com/llvm/llvm-project/commit/3c9dfba1894c6bceba0e087a8bd84212fd231d34
  Author: Jay Foad <jay.foad at amd.com>
  Date:   2021-10-07 (Thu, 07 Oct 2021)

  Changed paths:
    M llvm/lib/CodeGen/PHIElimination.cpp
    M llvm/test/CodeGen/X86/callbr-asm-kill.mir

  Log Message:
  -----------
  [PHIElimination] Account for INLINEASM_BR when inserting kills

When PHIElimination adds kills after lowering PHIs to COPYs it knows
that some instructions after the inserted COPY might use the same
SrcReg, but it was only looking at the terminator instructions at the
end of the block, not at other instructions like INLINEASM_BR that can
appear after the COPY insertion point.

Since we have already called findPHICopyInsertPoint, which knows about
INLINEASM_BR, we might as well reuse the insertion point that it
calculated when looking for instructions that might use SrcReg.

This fixes a machine verification failure if you force machine
verification to run after PHIElimination (currently it is disabled for
other reasons) when running
test/CodeGen/X86/callbr-asm-phi-placement.ll.

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


Compare: https://github.com/llvm/llvm-project/compare/13d1592716a6...3c9dfba1894c


More information about the All-commits mailing list