[all-commits] [llvm/llvm-project] c26dfc: [HACK] X86: Disable isCopyInstrImpl for undef subr...

Matt Arsenault via All-commits all-commits at lists.llvm.org
Fri Jul 28 10:33:43 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c26dfc81e254c78dc23579cf3d1336f77249e1f6
      https://github.com/llvm/llvm-project/commit/c26dfc81e254c78dc23579cf3d1336f77249e1f6
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2023-07-28 (Fri, 28 Jul 2023)

  Changed paths:
    M llvm/lib/Target/X86/X86InstrInfo.cpp
    A llvm/test/CodeGen/X86/coalescer-breaks-subreg-to-reg-liveness-reduced.ll

  Log Message:
  -----------
  [HACK] X86: Disable isCopyInstrImpl for undef subregister defs

This is a workaround for a coalescer bug where coalescing
SUBREG_TO_REG ends up losing the liveness of the high bits of the
source register. The result is an incorrect undef subregister def
instead of preserving the high values. Work around the observed
failure after the resulting mov is eliminated during allocation until
a proper fix is ready. I believe the proper fix is to make
SUBREG_TO_REG use a tied operand.

The test should catch a regression originally observed after
b7836d856206ec39509d42529f958c920368166b and should not show a
difference after a496c8be6e638ae58bb45f13113dbe3a4b7b23fd is reverted.

https://reviews.llvm.org/D156164




More information about the All-commits mailing list