| 1 |
; RUN: llvm-as %s -o %t.bc |
| 2 |
; RUN: llvm-spirv %t.bc -o %t.spv |
| 3 |
; RUN: llvm-spirv %t.spv -to-text -o %t.spt |
| 4 |
; RUN: FileCheck < %t.spt %s --check-prefix=CHECK-SPIRV |
| 5 |
; RUN: llvm-spirv -r -emit-opaque-pointers %t.spv -o %t.bc |
| 6 |
; RUN: llvm-dis < %t.bc | FileCheck %s --check-prefix=CHECK-LLVM |
| 7 |
|
| 8 |
; CHECK-SPIRV: Name [[#A:]] "a" |
| 9 |
; CHECK-SPIRV: Name [[#B:]] "b" |
| 10 |
; CHECK-SPIRV: Decorate [[#A]] FuncParamAttr 5 |
| 11 |
; CHECK-SPIRV: Decorate [[#A]] FuncParamAttr 6 |
| 12 |
; CHECK-SPIRV: Decorate [[#B]] FuncParamAttr 7 |
| 13 |
|
| 14 |
; CHECK-LLVM: {{.*}}void @test_builtin_readnone(ptr nocapture readonly %{{.*}}, ptr nocapture readnone %{{.*}}) |
| 15 |
|
| 16 |
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" |
| 17 |
target triple = "spir-unknown-unknown" |
| 18 |
|
| 19 |
; Function Attrs: convergent nofree norecurse nounwind uwtable |
| 20 |
define dso_local spir_kernel void @test_builtin_readnone(double* nocapture readonly %a, double* nocapture readnone %b) local_unnamed_addr #0 !kernel_arg_addr_space !3 !kernel_arg_access_qual !4 !kernel_arg_type !5 !kernel_arg_base_type !5 !kernel_arg_type_qual !6 { |
| 21 |
entry: |
| 22 |
%0 = load double, double* %a, align 8, !tbaa !7 |
| 23 |
%call = tail call double @_Z3expd(double %0) #2 |
| 24 |
store double %call, double* %b, align 8, !tbaa !7 |
| 25 |
%1 = load double, double* %a, align 8, !tbaa !7 |
| 26 |
%call1 = tail call double @_Z3cosd(double %1) #2 |
| 27 |
store double %call1, double* %b, align 8, !tbaa !7 |
| 28 |
ret void |
| 29 |
} |
| 30 |
|
| 31 |
; Function Attrs: convergent nounwind |
| 32 |
declare dso_local double @_Z3expd(double) local_unnamed_addr #1 |
| 33 |
|
| 34 |
; Function Attrs: convergent nounwind |
| 35 |
declare dso_local double @_Z3cosd(double) local_unnamed_addr #1 |
| 36 |
|
| 37 |
attributes #0 = { convergent nofree norecurse nounwind uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" "uniform-work-group-size"="false" "unsafe-fp-math"="false" "use-soft-float"="false" } |
| 38 |
attributes #1 = { convergent nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" "unsafe-fp-math"="false" "use-soft-float"="false" } |
| 39 |
attributes #2 = { convergent nounwind } |
| 40 |
|
| 41 |
!llvm.module.flags = !{!0} |
| 42 |
!opencl.ocl.version = !{!1} |
| 43 |
!llvm.ident = !{!2} |
| 44 |
|
| 45 |
!0 = !{i32 1, !"wchar_size", i32 4} |
| 46 |
!1 = !{i32 2, i32 0} |
| 47 |
!2 = !{!"clang version 12.0.0 (https://github.com/intel/llvm 275e05b9dc13deb44eb7c765d23e65358d6bd077)"} |
| 48 |
!3 = !{i32 1, i32 1} |
| 49 |
!4 = !{!"none", !"none"} |
| 50 |
!5 = !{!"double*", !"double*"} |
| 51 |
!6 = !{!"", !""} |
| 52 |
!7 = !{!8, !8, i64 0} |
| 53 |
!8 = !{!"double", !9, i64 0} |
| 54 |
!9 = !{!"omnipotent char", !10, i64 0} |
| 55 |
!10 = !{!"Simple C/C++ TBAA"} |