[all-commits] [llvm/llvm-project] 291ece: AMDGPU/GlobalISel: Remove some selection tests whi...

Matt Arsenault via All-commits all-commits at lists.llvm.org
Tue Jun 30 16:18:19 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 291ece0efa038000a31c93f132f6732ee8d30e89
      https://github.com/llvm/llvm-project/commit/291ece0efa038000a31c93f132f6732ee8d30e89
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2020-06-30 (Tue, 30 Jun 2020)

  Changed paths:
    M llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-and.mir
    M llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-brcond.mir
    M llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-build-vector.mir
    M llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-copy.mir
    M llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-merge-values.mir
    M llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-or.mir
    M llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-unmerge-values.mir
    M llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-xor.mir

  Log Message:
  -----------
  AMDGPU/GlobalISel: Remove some selection tests which should be invalid

These use undef generic virtual register operands, which should be
rejected by the verifier.


  Commit: e9eab30339a70596386b175b415167cc97e062d5
      https://github.com/llvm/llvm-project/commit/e9eab30339a70596386b175b415167cc97e062d5
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2020-06-30 (Tue, 30 Jun 2020)

  Changed paths:
    M llvm/lib/CodeGen/MachineVerifier.cpp
    A llvm/test/MachineVerifier/generic-vreg-undef-use.mir

  Log Message:
  -----------
  GlobalISel: Disallow undef generic virtual register uses

With an undef operand, it's possible for getVRegDef to fail and return
null. This is an edge case very little code bothered to
consider. Proper gMIR should use G_IMPLICIT_DEF instead.

I initially tried to apply this restriction to all SSA MIR, so then
getVRegDef would never fail anywhere. However, ProcessImplicitDefs
does technically run while the function is in SSA. ProcessImplicitDefs
and DetectDeadLanes would need to either move, or a new pseudo-SSA
type of function property would need to be introduced.


Compare: https://github.com/llvm/llvm-project/compare/b6c490349d15...e9eab30339a7


More information about the All-commits mailing list