[all-commits] [llvm/llvm-project] e41df5: [SPIR-V] Fix OpDecorate emission after vreg def. (...

Nathan Gauër via All-commits all-commits at lists.llvm.org
Mon Nov 4 04:11:19 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e41df5cb8e34f471da351d6e78c0e47e3639fd12
      https://github.com/llvm/llvm-project/commit/e41df5cb8e34f471da351d6e78c0e47e3639fd12
  Author: Nathan Gauër <brioche at google.com>
  Date:   2024-11-04 (Mon, 04 Nov 2024)

  Changed paths:
    M llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp
    M llvm/lib/Target/SPIRV/SPIRVPreLegalizer.cpp
    A llvm/test/CodeGen/SPIRV/decoration-order.ll

  Log Message:
  -----------
  [SPIR-V] Fix OpDecorate emission after vreg def. (#114426)

In SPIR-V, OpDecorate instructions are allowed to forward-declare a
virtual register. But while we are at the MIR level, we must comply with
stricter rules, meaning OpDecorate should be emited after, not before
the reg definition.
(In some cases, we defined those just before, switching to just after).

Related to #110652

---------

Signed-off-by: Nathan Gauër <brioche at google.com>



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