[all-commits] [llvm/llvm-project] 460280: [AMDGPU] Shrink to SOPK with 32-bit signed literal...

Stanislav Mekhanoshin via All-commits all-commits at lists.llvm.org
Thu Oct 26 00:27:07 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 46028022407d003b8af4ddf27a4679de4891f10d
      https://github.com/llvm/llvm-project/commit/46028022407d003b8af4ddf27a4679de4891f10d
  Author: Stanislav Mekhanoshin <rampitec at users.noreply.github.com>
  Date:   2023-10-26 (Thu, 26 Oct 2023)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp
    A llvm/test/CodeGen/AMDGPU/shrink-i32-kimm.mir

  Log Message:
  -----------
  [AMDGPU] Shrink to SOPK with 32-bit signed literals (#70263)

A literal like 0xffff8000 is valid to be used as KIMM in a SOPK
instruction, but at the moment our checks expect it to be fully sign
extended to a 64-bit signed integer. This is not required since all
cases which are being shrunk only accept 32-bit operands.

We need to sign extend the operand to 64-bit though so it passes the
verifier and properly printed.




More information about the All-commits mailing list