| 1 |
; __kernel void fmod_kernel( float out, float in1, float in2 ) |
| 2 |
; { out = fmod( in1, in2 ); } |
| 3 |
|
| 4 |
; RUN: llvm-as %s -o %t.bc |
| 5 |
; RUN: llvm-spirv %t.bc -spirv-text -o %t.spt |
| 6 |
; RUN: FileCheck < %t.spt %s --check-prefix=CHECK-SPIRV |
| 7 |
; RUN: llvm-spirv %t.bc -o %t.spv |
| 8 |
; RUN: spirv-val %t.spv |
| 9 |
; RUN: llvm-spirv -r -emit-opaque-pointers %t.spv -o %t.bc |
| 10 |
; RUN: llvm-dis < %t.bc | FileCheck %s --check-prefix=CHECK-LLVM |
| 11 |
|
| 12 |
; CHECK-SPIRV: 7 ExtInst {{[0-9]+}} {{[0-9]+}} {{[0-9]+}} fmod {{[0-9]+}} {{[0-9]+}} |
| 13 |
; CHECK-LLVM: call spir_func float @_Z4fmodff( |
| 14 |
; CHECK-LLVM: declare spir_func float @_Z4fmodff(float, float) |
| 15 |
|
| 16 |
target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-n8:16:32:64" |
| 17 |
target triple = "spir64-unknown-unknown" |
| 18 |
|
| 19 |
; Function Attrs: nounwind |
| 20 |
define spir_kernel void @fmod_kernel(float %out, float %in1, float %in2) #0 !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !3 !kernel_arg_base_type !4 !kernel_arg_type_qual !5 { |
| 21 |
entry: |
| 22 |
%call = call spir_func float @_Z4fmodff(float %in1, float %in2) #2 |
| 23 |
ret void |
| 24 |
} |
| 25 |
|
| 26 |
; Function Attrs: nounwind readnone |
| 27 |
declare spir_func float @_Z4fmodff(float, float) #1 |
| 28 |
|
| 29 |
attributes #0 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-realign-stack" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" } |
| 30 |
attributes #1 = { nounwind readnone "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-realign-stack" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" } |
| 31 |
attributes #2 = { nounwind readnone } |
| 32 |
|
| 33 |
!opencl.enable.FP_CONTRACT = !{} |
| 34 |
!opencl.spir.version = !{!6} |
| 35 |
!opencl.ocl.version = !{!7} |
| 36 |
!opencl.used.extensions = !{!8} |
| 37 |
!opencl.used.optional.core.features = !{!8} |
| 38 |
!opencl.compiler.options = !{!8} |
| 39 |
!llvm.ident = !{!9} |
| 40 |
|
| 41 |
!1 = !{i32 0, i32 0, i32 0} |
| 42 |
!2 = !{!"none", !"none", !"none"} |
| 43 |
!3 = !{!"float", !"float", !"float"} |
| 44 |
!4 = !{!"float", !"float", !"float"} |
| 45 |
!5 = !{!"", !"", !""} |
| 46 |
!6 = !{i32 1, i32 2} |
| 47 |
!7 = !{i32 2, i32 0} |
| 48 |
!8 = !{} |
| 49 |
!9 = !{!"clang version 3.6.1"} |