[all-commits] [llvm/llvm-project] b0d03c: [SPIR-V] Fix illegal OpConstantComposite instructi...

Vyacheslav Levytskyy via All-commits all-commits at lists.llvm.org
Mon Mar 25 02:15:07 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b0d03ccc0855f2bff39160f25fcde06aae07cace
      https://github.com/llvm/llvm-project/commit/b0d03ccc0855f2bff39160f25fcde06aae07cace
  Author: Vyacheslav Levytskyy <vyacheslav.levytskyy at intel.com>
  Date:   2024-03-25 (Mon, 25 Mar 2024)

  Changed paths:
    M llvm/lib/Target/SPIRV/SPIRVDuplicatesTracker.cpp
    M llvm/lib/Target/SPIRV/SPIRVDuplicatesTracker.h
    M llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.cpp
    M llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.h
    M llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp
    M llvm/lib/Target/SPIRV/SPIRVPreLegalizer.cpp
    M llvm/lib/Target/SPIRV/SPIRVSymbolicOperands.td
    M llvm/test/CodeGen/SPIRV/pointers/struct-opaque-pointers.ll

  Log Message:
  -----------
  [SPIR-V] Fix illegal OpConstantComposite instruction with non-const constituents in SPIR-V Backend (#86352)

This PR fixes illegal use of OpConstantComposite with non-constant
constituents. The test attached to the PR is able now to satisfy
`spirv-val` check. Before the fix SPIR-V Backend produced for the
attached test case a pattern like
```
%a = OpVariable %_ptr_CrossWorkgroup_uint CrossWorkgroup %uint_123
%11 = OpConstantComposite %_struct_6 %a %a
```
so that `spirv-val` complained with
```
error: line 25: OpConstantComposite Constituent <id> '10[%a]' is not a constant or undef.
  %11 = OpConstantComposite %_struct_6 %a %a
```



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