1; RUN: rs2spirv_lit_driver.sh %s | FileCheck %s 2 3target datalayout = "e-p:32:32-i64:64-v128:64:128-n32-S64" 4target triple = "armv7-none-linux-gnueabi" 5 6; CHECK: OpEntryPoint GLCompute %[[WrapperId:[a-zA-Z_0-9]*]] "entry_setImageAlpha" 7 8; Function Attrs: norecurse nounwind readnone 9define void @NOP() #0 { 10entry: 11 ret void 12} 13 14; CHECK: [[KernelId:%[a-zA-Z_0-9]+]] = OpFunction {{.*}} 15 16; Function calls to _Z14convert_uchar4Dv4_j should be translated into OpUConvert instructions 17; CHECK-NOT: OpFunctionCall %v4uchar %_Z14convert_uchar4Dv4_j 18; CHECK-NOT: OpFunctionCall %v4uint %_Z13convert_uint4Dv4_h 19; CHECK: OpUConvert %v4uint 20; CHECK: OpUConvert %v4uchar 21 22; Function Attrs: nounwind readnone 23define <4 x i8> @setImageAlpha(<4 x i8> %in) #1 { 24entry: 25 %call = tail call <4 x i32> @_Z13convert_uint4Dv4_h(<4 x i8> %in) #2 26 %mul = mul <4 x i32> %call, <i32 37, i32 37, i32 37, i32 37> 27 %shr = lshr <4 x i32> %mul, <i32 8, i32 8, i32 8, i32 8> 28 %call1 = tail call <4 x i8> @_Z14convert_uchar4Dv4_j(<4 x i32> %shr) #2 29 %call2 = tail call fastcc <4 x i8> @twice(<4 x i8> %call1) 30 %0 = insertelement <4 x i8> %call2, i8 37, i32 3 31 ret <4 x i8> %0 32} 33 34; Function Attrs: norecurse nounwind readnone 35define internal fastcc <4 x i8> @twice(<4 x i8> %in) #0 { 36entry: 37 %mul = shl <4 x i8> %in, <i8 1, i8 1, i8 1, i8 1> 38 ret <4 x i8> %mul 39} 40 41; Function Attrs: nounwind readnone 42declare <4 x i8> @_Z14convert_uchar4Dv4_j(<4 x i32>) #1 43 44; Function Attrs: nounwind readnone 45declare <4 x i32> @_Z13convert_uint4Dv4_h(<4 x i8>) #1 46 47attributes #0 = { norecurse nounwind readnone "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="0" "stackrealign" "target-features"="+long64" "unsafe-fp-math"="false" "use-soft-float"="false" } 48attributes #1 = { nounwind readnone "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="0" "stackrealign" "target-features"="+long64" "unsafe-fp-math"="false" "use-soft-float"="false" } 49attributes #2 = { nounwind readnone } 50 51!llvm.module.flags = !{!0, !1} 52!llvm.ident = !{!2} 53!\23pragma = !{!3, !4, !5} 54!\23rs_export_func = !{!6} 55!\23rs_export_foreach_name = !{!7, !8} 56!\23rs_export_foreach = !{!9, !10} 57 58!0 = !{i32 1, !"wchar_size", i32 4} 59!1 = !{i32 1, !"min_enum_size", i32 4} 60!2 = !{!"Android clang version 3.8.256229 (based on LLVM 3.8.256229)"} 61!3 = !{!"version", !"1"} 62!4 = !{!"java_package_name", !"rs2spirv"} 63!5 = !{!"rs_fp_relaxed", !""} 64!6 = !{!"NOP"} 65!7 = !{!"root"} 66!8 = !{!"setImageAlpha"} 67!9 = !{!"0"} 68!10 = !{!"35"} 69