[all-commits] [llvm/llvm-project] 62d6fa: [SPIR-V] Support optimization of branching with an...

Vyacheslav Levytskyy via All-commits all-commits at lists.llvm.org
Tue Oct 15 09:42:54 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 62d6fa830dad167770a83b86b11f4fb5b8e52676
      https://github.com/llvm/llvm-project/commit/62d6fa830dad167770a83b86b11f4fb5b8e52676
  Author: Vyacheslav Levytskyy <vyacheslav.levytskyy at intel.com>
  Date:   2024-10-15 (Tue, 15 Oct 2024)

  Changed paths:
    M llvm/lib/Target/SPIRV/SPIRVInstrInfo.cpp
    M llvm/lib/Target/SPIRV/SPIRVInstrInfo.td
    A llvm/test/CodeGen/SPIRV/branching/analyze-branch-opt.ll

  Log Message:
  -----------
  [SPIR-V] Support optimization of branching with analyzeBranch/removeBranch/insertBranch functions (#110653)

This PR fixes implementation of `SPIRVInstrInfo::analyzeBranch()` and
adds implementations of `SPIRVInstrInfo::removeBranch()` and
`SPIRVInstrInfo::insertBranch()` to support Branch Folding and If
Conversion optimization.

The attached test case failed before this PR due to report_fatal_error()
firing on missing implementation of `SPIRVInstrInfo::removeBranch()`.

The new test case is not able to pass spirv-val check at the moment due
to the issue described in
https://github.com/llvm/llvm-project/issues/110652 , this is not related
to this PR.

This PR also updates instructions definition in tablegen to set
isBranch=1 for relevant instructions.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list