[all-commits] [llvm/llvm-project] 7c706a: [AMDGPU] SIFoldOperands: clean up tryConstantFoldOp

Jay Foad via All-commits all-commits at lists.llvm.org
Thu May 6 02:30:05 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7c706af03b8634f1f2a64599037580e5f4785082
      https://github.com/llvm/llvm-project/commit/7c706af03b8634f1f2a64599037580e5f4785082
  Author: Jay Foad <jay.foad at amd.com>
  Date:   2021-05-06 (Thu, 06 May 2021)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIFoldOperands.cpp
    M llvm/test/CodeGen/AMDGPU/GlobalISel/fshr.ll

  Log Message:
  -----------
  [AMDGPU] SIFoldOperands: clean up tryConstantFoldOp

First clean up the strange API of tryConstantFoldOp where it took an
immediate operand value, but no indication of which operand it was the
value for.

Second clean up the loop that calls tryConstantFoldOp so that it does
not have to restart from the beginning every time it folds an
instruction.

This is NFCI but there are some minor changes caused by the order in
which things are folded.

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




More information about the All-commits mailing list