KhronosGroup / KhronosGroup/SPIRV-LLVM-Translator

Unsupported instruction: freeze

Open
#1,140 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
LLVM
Stars
625
Forks
279
Avg merge
3d 5h
Merged PRs (30d)
34

Description

```llvm
target triple = "spir64-unknown-unknown"

define spir_kernel void @kernel() {
%1 = freeze i32 undef
ret void
}
```

```
InvalidInstruction: Can't translate llvm instruction:
%1 = freeze i32 undef
[Src: ../lib/SPIRV/SPIRVWriter.cpp:1702 ]
```

Contributor guide

Open the contributing guide

Research direction

Start with the reproducing LLVM IR snippet and the failure reported at lib/SPIRV/SPIRVWriter.cpp:1702. Trace how the translator handles the freeze instruction and compare that path with nearby instruction handling. Done means the snippet no longer raises InvalidInstruction and translates successfully.

Written by the indexing model from the issue text.

Assessment

Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.