Files
clang-p2996/llvm/test/CodeGen/SPIRV/transcoding/OpSwitchEmpty.ll
Andrey Tretyakov 4bd9d98bc2 [SPIRV] Fix style of LIT tests and remove metadata
Fix style, indentation, comments of LIT tests
and remove unnecessary metadata and attributes.

Differential Revision: https://reviews.llvm.org/D130664
2022-08-03 02:33:24 +03:00

25 lines
613 B
LLVM

;; Source:
;; void kk(int x){
;; switch(x) {
;; default: return;
;; }
;; }
;; Command:
;; clang -cc1 -triple spir -emit-llvm -o test/SPIRV/OpSwitchEmpty.ll OpSwitchEmpty.cl -disable-llvm-passes
; RUN: llc -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s --check-prefix=CHECK-SPIRV
; CHECK-SPIRV: %[[#X:]] = OpFunctionParameter %[[#]]
; CHECK-SPIRV: OpSwitch %[[#X]] %[[#DEFAULT:]]{{$}}
; CHECK-SPIRV: %[[#DEFAULT]] = OpLabel
define spir_func void @kk(i32 %x) {
entry:
switch i32 %x, label %sw.default [
]
sw.default: ; preds = %entry
ret void
}