[all-commits] [llvm/llvm-project] fc0b6a: RegisterCoalescer: Fix assert on remat to copy-to-...

Matt Arsenault via All-commits all-commits at lists.llvm.org
Sun Jan 5 23:51:43 PST 2025


  Branch: refs/heads/users/arsenm/issue120970/fix-assert-clobber-rematerialize-super-reg-def-at-subreg-extract
  Home:   https://github.com/llvm/llvm-project
  Commit: fc0b6a774ac3e5144ee1f20e268b2a779fba37f2
      https://github.com/llvm/llvm-project/commit/fc0b6a774ac3e5144ee1f20e268b2a779fba37f2
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2025-01-06 (Mon, 06 Jan 2025)

  Changed paths:
    M llvm/lib/CodeGen/RegisterCoalescer.cpp
    A llvm/test/CodeGen/AMDGPU/remat-physreg-copy-subreg-extract-already-live-at-def-issue120970.mir

  Log Message:
  -----------
  RegisterCoalescer: Fix assert on remat to copy-to-physreg with subregs

Do not try to rematerialize a super-register def used by a subregister
extract copy into a copy to a physical register if the other pieces of the
full physreg are live at the rematerialization point. It would insert the
super-register def at the rematerialization point, and assert since the
other half of the register was already live.

This is analagous to the undef subregister def handling above,
which handled the virtual register case.

Fixes #120970



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list