Home | History | Annotate | Download | only in arguments
      1 ; RUN: rs2spirv_lit_driver.sh %s | FileCheck %s
      2 
      3 ; CHECK: OpDecorate [[InVar1:%.*]] Binding 2
      4 ; CHECK: OpDecorate [[OutVar1:%.*]] Binding 1
      5 
      6 ; CHECK: OpDecorate [[InVar2:%.*]] Binding 2
      7 ; CHECK: OpDecorate [[OutVar2:%.*]] Binding 1
      8 
      9 ; CHECK: OpDecorate [[InVar3:%.*]] Binding 2
     10 ; CHECK: OpDecorate [[OutVar3:%.*]] Binding 1
     11 
     12 ; CHECK: OpDecorate [[InVar4:%.*]] Binding 2
     13 ; CHECK: OpDecorate [[OutVar4:%.*]] Binding 1
     14 
     15 ; CHECK: [[MemberTy1:%.*]] = OpTypeRuntimeArray %v4uint
     16 ; CHECK: [[Struct1:%.*]] = OpTypeStruct [[MemberTy1]]
     17 ; CHECK: [[PtrTy1:%.*]] = OpTypePointer Uniform [[Struct1]]
     18 ; CHECK: [[InVar1]] = OpVariable [[PtrTy1]]
     19 
     20 ; CHECK: [[OutMemberTy1:%.*]] = OpTypeRuntimeArray %v4uint
     21 ; CHECK: [[OutStruct1:%.*]] = OpTypeStruct [[OutMemberTy1]]
     22 ; CHECK: [[OutPtrTy1:%.*]] = OpTypePointer Uniform [[OutStruct1]]
     23 ; CHECK: [[OutVar1]] = OpVariable [[OutPtrTy1]]
     24 
     25 ; CHECK: [[MemberTy2:%.*]] = OpTypeRuntimeArray %v4uint
     26 ; CHECK: [[Struct2:%.*]] = OpTypeStruct [[MemberTy2]]
     27 ; CHECK: [[PtrTy2:%.*]] = OpTypePointer Uniform [[Struct2]]
     28 ; CHECK: [[InVar2]] = OpVariable [[PtrTy2]]
     29 
     30 ; CHECK: [[OutMemberTy2:%.*]] = OpTypeRuntimeArray %v4uint
     31 ; CHECK: [[OutStruct2:%.*]] = OpTypeStruct [[OutMemberTy2]]
     32 ; CHECK: [[OutPtrTy2:%.*]] = OpTypePointer Uniform [[OutStruct2]]
     33 ; CHECK: [[OutVar2]] = OpVariable [[OutPtrTy2]]
     34 
     35 ; CHECK: [[MemberTy3:%.*]] = OpTypeRuntimeArray %uint
     36 ; CHECK: [[Struct3:%.*]] = OpTypeStruct [[MemberTy3]]
     37 ; CHECK: [[PtrTy3:%.*]] = OpTypePointer Uniform [[Struct3]]
     38 ; CHECK: [[InVar3]] = OpVariable [[PtrTy3]]
     39 
     40 ; CHECK: [[OutMemberTy3:%.*]] = OpTypeRuntimeArray %uint
     41 ; CHECK: [[OutStruct3:%.*]] = OpTypeStruct [[OutMemberTy3]]
     42 ; CHECK: [[OutPtrTy3:%.*]] = OpTypePointer Uniform [[OutStruct3]]
     43 ; CHECK: [[OutVar3]] = OpVariable [[OutPtrTy3]]
     44 
     45 ; CHECK: [[MemberTy4:%.*]] = OpTypeRuntimeArray %uint
     46 ; CHECK: [[Struct4:%.*]] = OpTypeStruct [[MemberTy4]]
     47 ; CHECK: [[PtrTy4:%.*]] = OpTypePointer Uniform [[Struct4]]
     48 ; CHECK: [[InVar4]] = OpVariable [[PtrTy4]]
     49 
     50 ; CHECK: [[OutMemberTy4:%.*]] = OpTypeRuntimeArray %uint
     51 ; CHECK: [[OutStruct4:%.*]] = OpTypeStruct [[OutMemberTy4]]
     52 ; CHECK: [[OutPtrTy4:%.*]] = OpTypePointer Uniform [[OutStruct4]]
     53 ; CHECK: [[OutVar4]] = OpVariable [[OutPtrTy4]]
     54 
     55 ; // the RS the .rs from which this .ll is generated
     56 ; #pragma version(1)
     57 ; #pragma rs java_package_name(com.android.rs.test)
     58 
     59 ; int4 RS_KERNEL increment4(int4 in)
     60 ; {
     61 ;     return in + 1;
     62 ; }
     63 
     64 ; uint4 RS_KERNEL uincrement4(uint4 in)
     65 ; {
     66 ;     return in + 1;
     67 ; }
     68 
     69 ; int RS_KERNEL increment(int in)
     70 ; {
     71 ;     return in + 1;
     72 ; }
     73 
     74 ; unsigned RS_KERNEL uincrement(unsigned in)
     75 ; {
     76 ;     return in + 1;
     77 ; }
     78 
     79 
     80 target datalayout = "e-p:32:32-i64:64-v128:64:128-n32-S64"
     81 target triple = "armv7-none-linux-gnueabi"
     82 
     83 ; Function Attrs: norecurse nounwind readnone
     84 define <4 x i32> @increment4(<4 x i32> %in) local_unnamed_addr #0 {
     85 entry:
     86   %add = add <4 x i32> %in, <i32 1, i32 1, i32 1, i32 1>
     87   ret <4 x i32> %add
     88 }
     89 
     90 ; Function Attrs: norecurse nounwind readnone
     91 define <4 x i32> @uincrement4(<4 x i32> %in) local_unnamed_addr #0 {
     92 entry:
     93   %add = add <4 x i32> %in, <i32 1, i32 1, i32 1, i32 1>
     94   ret <4 x i32> %add
     95 }
     96 
     97 ; Function Attrs: norecurse nounwind readnone
     98 define i32 @increment(i32 %in) local_unnamed_addr #0 {
     99 entry:
    100   %add = add nsw i32 %in, 1
    101   ret i32 %add
    102 }
    103 
    104 ; Function Attrs: norecurse nounwind readnone
    105 define i32 @uincrement(i32 %in) local_unnamed_addr #0 {
    106 entry:
    107   %add = add i32 %in, 1
    108   ret i32 %add
    109 }
    110 
    111 attributes #0 = { norecurse nounwind readnone "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "stack-protector-buffer-size"="0" "stackrealign" "unsafe-fp-math"="false" "use-soft-float"="false" }
    112 
    113 !llvm.module.flags = !{!0, !1}
    114 !llvm.ident = !{!2}
    115 !\23pragma = !{!3, !4}
    116 !\23rs_export_foreach_name = !{!5, !6, !7, !8, !9}
    117 !\23rs_export_foreach = !{!10, !11, !11, !11, !11}
    118 
    119 !0 = !{i32 1, !"wchar_size", i32 4}
    120 !1 = !{i32 1, !"min_enum_size", i32 4}
    121 !2 = !{!"Android clang version 3.8.275480  (based on LLVM 3.8.275480)"}
    122 !3 = !{!"version", !"1"}
    123 !4 = !{!"java_package_name", !"com.android.rs.test"}
    124 !5 = !{!"root"}
    125 !6 = !{!"increment4"}
    126 !7 = !{!"uincrement4"}
    127 !8 = !{!"increment"}
    128 !9 = !{!"uincrement"}
    129 !10 = !{!"0"}
    130 !11 = !{!"35"}
    131