[all-commits] [llvm/llvm-project] 0892a9: AMDGPU: Optimize s_setreg_b32 to s_denorm_mode/s_r...

Matt Arsenault via All-commits all-commits at lists.llvm.org
Fri May 29 18:19:04 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 0892a96a05a8943457a4a3e2547923087aa06226
      https://github.com/llvm/llvm-project/commit/0892a96a05a8943457a4a3e2547923087aa06226
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2020-05-29 (Fri, 29 May 2020)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIDefines.h
    M llvm/lib/Target/AMDGPU/SIISelLowering.cpp
    M llvm/lib/Target/AMDGPU/SOPInstructions.td
    M llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.s.setreg.ll
    M llvm/test/CodeGen/AMDGPU/llvm.amdgcn.s.setreg.ll

  Log Message:
  -----------
  AMDGPU: Optimize s_setreg_b32 to s_denorm_mode/s_round_mode

This is a custom inserter because it was less work than teaching
tablegen a way to indicate that it is sometimes OK to have a no side
effect instruction in the output of a side effecting pattern.

The asm is needed to look like a read of the mode register to prevent
it from being deleted. However, there seems to be a bug where the mode
register def instructions are moved across the asm sideeffect by the
post-RA scheduler.

Another oddity is the immediate is formatted differently between
s_denorm_mode and s_round_mode.




More information about the All-commits mailing list