[all-commits] [llvm/llvm-project] e1beeb: SplitKit: Don't further split subrange mask in bui...

Ruiling, Song via All-commits all-commits at lists.llvm.org
Thu Aug 12 16:37:25 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e1beebbac5da99b2451f25c2028531c12a70860a
      https://github.com/llvm/llvm-project/commit/e1beebbac5da99b2451f25c2028531c12a70860a
  Author: Ruiling Song <ruiling.song at amd.com>
  Date:   2021-08-13 (Fri, 13 Aug 2021)

  Changed paths:
    M llvm/lib/CodeGen/SplitKit.cpp
    A llvm/test/CodeGen/AMDGPU/extend-phi-subrange-not-in-parent.mir

  Log Message:
  -----------
  SplitKit: Don't further split subrange mask in buildCopy

We may use several COPY instructions to copy the needed sub-registers
during split. But the way we split the lanes during the COPYs may be
different from the subranges of the old register. This would fail when we
extend the subranges of the new register because the LaneMasks do not
match exactly between subranges of new register and old register.
Since we are bundling the COPYs, I think there is no need to further refine the
subranges of the new register based on the set of LaneMasks of the inserted COPYs.

I am not sure if there will be further breaking cases. But as the subranges of
new register are created based on the LaneMasks of the subranges of old register,
it will be highly possible we will always find an exact LaneMask match.
We can think about how to make the extendPHIKillRanges() work for
subrange mask mismatch case if we meet more such cases in the future.

The test case was from D105065 by @arsenm.

Differential Revision: https://reviews.llvm.org/D107829




More information about the All-commits mailing list