Debian Codegraph @

llvm/test/CodeGen/SPIRV/branching/OpSwitchEmpty.ll

raw
1 ;; Source:
2 ;; void kk(int x){
3 ;; switch(x) {
4 ;; default: return;
5 ;; }
6 ;; }
7
8 ;; Command:
9 ;; clang -cc1 -triple spir -emit-llvm -o test/SPIRV/OpSwitchEmpty.ll OpSwitchEmpty.cl -disable-llvm-passes
10
11 ; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv64-unknown-unknown %s -o - | FileCheck %s --check-prefix=CHECK-SPIRV
12 ; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv64-unknown-unknown %s -o - -filetype=obj | spirv-val %}
13
14 ; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s --check-prefix=CHECK-SPIRV
15 ; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv32-unknown-unknown %s -o - -filetype=obj | spirv-val %}
16
17 ; CHECK-SPIRV: %[[#X:]] = OpFunctionParameter %[[#]]
18 ; CHECK-SPIRV: OpSwitch %[[#X]] %[[#DEFAULT:]]{{$}}
19 ; CHECK-SPIRV: %[[#DEFAULT]] = OpLabel
20
21 define spir_func void @kk(i32 %x) {
22 entry:
23 switch i32 %x, label %sw.default [
24 ]
25
26 sw.default: ; preds = %entry
27 ret void
28 }