[PATCH] D51848: [RegisterCoalescer] Fixup "Fixed inconsistent followCopyChain with subreg"

Tim Renouf via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 10 00:42:30 PDT 2018


tpr created this revision.
Herald added subscribers: llvm-commits, nhaehnle, jvesely, qcolombet, MatzeB.

This fixes up my earlier fix https://reviews.llvm.org/D49535 https://reviews.llvm.org/rL338070.

In followCopyChain, the comparison I added to check that two subranges
arrived back at the same def point was bogus. Fixed here.

The test fails with a "Couldn't join subrange" assert without this fix,
because followCopyChain gives the wrong answer and makes a coalesce of A
and B appear impossible where there are copies A->C->B and A is a subreg
def.

Change-Id: I4257fb93800d3834d2b1894359d778f3fdb43f40


Repository:
  rL LLVM

https://reviews.llvm.org/D51848

Files:
  lib/CodeGen/RegisterCoalescer.cpp
  test/CodeGen/AMDGPU/regcoal-followcopychain-bogus-subrange-comparison.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51848.164621.patch
Type: text/x-patch
Size: 6793 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180910/f4696d24/attachment.bin>


More information about the llvm-commits mailing list