[all-commits] [llvm/llvm-project] 21bc8e: AMDGPU: Make VReg_1 only include 1 artificial regi...

Matt Arsenault via All-commits all-commits at lists.llvm.org
Mon Oct 28 20:52:00 PDT 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 21bc8e5a137d76879223ac2d8ff1ba92e2ea3acb
      https://github.com/llvm/llvm-project/commit/21bc8e5a137d76879223ac2d8ff1ba92e2ea3acb
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2019-10-28 (Mon, 28 Oct 2019)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIRegisterInfo.td
    M llvm/test/CodeGen/AMDGPU/inline-asm.ll

  Log Message:
  -----------
  AMDGPU: Make VReg_1 only include 1 artificial register

When TableGen is inferring register classes from contexts, it uses a
sorting function based on the number of registers in the class. Since
this was being treated as an alias of VGPR_32, they had exactly the
same size. The sort used wasn't a stable sort, and even if it were, I
believe the tie breaker would effectively end up being the
alphabetical ordering of the class name. There appear to be issues
trying to use an empty set of registers, so add only one so this will
always sort to the end.

Also add a comment explaining how VReg_1 is a dirty hack for
SelectionDAG.

This does end up changing the behavior of i1 with inline asm and VGPR
constraints, but the existing behavior was was already nonsensical and
inconsistent. It should probably be disallowed anyway.

Fixes bug 43699




More information about the All-commits mailing list