1 ; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv64-unknown-unknown %s -o - | FileCheck %s
2 ; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv64-unknown-unknown %s -o - -filetype=obj | spirv-val %}
4 ; Ensure that these calls do not represent any code and don't cause a crash.
6 ; CHECK-NEXT: OpFunctionParameter
9 ; CHECK-NEXT: OpFunctionEnd
11 define spir_kernel void @foo(ptr %p) {
13 call void @llvm.trap()
14 call void @llvm.debugtrap()
15 call void @llvm.ubsantrap(i8 100)
17 %r1 = call ptr @llvm.invariant.start.p0(i64 1024, ptr %p)
18 call void @llvm.invariant.end.p0(ptr %r1, i64 1024, ptr %p)
20 call void @llvm.instrprof.increment(ptr %p, i64 0, i32 1, i32 0)
21 call void @llvm.instrprof.increment.step(ptr %p, i64 0, i32 1, i32 0, i64 1)
22 call void @llvm.instrprof.value.profile(ptr %p, i64 0, i64 0, i32 1, i32 0)