[all-commits] [llvm/llvm-project] 3b17cb: [AMDGPU] Kill def when folding immediate in two-ad...

Stanislav Mekhanoshin via All-commits all-commits at lists.llvm.org
Fri Dec 3 09:55:20 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3b17cb1506e5d79cfb2b7c0b903395c3f0a1a310
      https://github.com/llvm/llvm-project/commit/3b17cb1506e5d79cfb2b7c0b903395c3f0a1a310
  Author: Stanislav Mekhanoshin <Stanislav.Mekhanoshin at amd.com>
  Date:   2021-12-03 (Fri, 03 Dec 2021)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
    M llvm/test/CodeGen/AMDGPU/mul24-pass-ordering.ll
    M llvm/test/CodeGen/AMDGPU/twoaddr-fma.mir

  Log Message:
  -----------
  [AMDGPU] Kill def when folding immediate in two-addr pass

Two-address pass works right before RA and if an immediate
was folded into an instruction there is nothing to remove
the dead def. We end up with something like:

	v_mov_b32_e32 v14, 0xc1700000
	v_mov_b32_e32 v14, 0x41200000
	v_fmaak_f32 v51, s67, v19, 0xc1700000
	v_fmaak_f32 v38, v51, v19, 0x4120000

The patch kills the dead move instruction right in the folding.

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




More information about the All-commits mailing list