• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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; CHECK-NOT: OpFunctionCall %v4uchar %__Z14convert_uchar4Dv4_j
9; CHECK-NOT: OpFunctionCall %v4uint %__Z13convert_uint4Dv4_h
10
11; CHECK: OpUConvert %v4uint
12; CHECK: OpUConvert %v4uchar
13
14@alpha = global i8 0, align 1
15
16; Function Attrs: nounwind readonly
17define <4 x i8> @setImageAlpha(<4 x i8> %in, i32 %x, i32 %y) #0 {
18entry:
19  %call = tail call <4 x i32> @_Z13convert_uint4Dv4_h(<4 x i8> %in) #2
20  %0 = load i8, i8* @alpha, align 1, !tbaa !11
21  %conv = zext i8 %0 to i32
22  %splat.splatinsert = insertelement <4 x i32> undef, i32 %conv, i32 0
23  %splat.splat = shufflevector <4 x i32> %splat.splatinsert, <4 x i32> undef, <4 x i32> zeroinitializer
24  %mul = mul <4 x i32> %splat.splat, %call
25  %shr = lshr <4 x i32> %mul, <i32 8, i32 8, i32 8, i32 8>
26  %call1 = tail call <4 x i8> @_Z14convert_uchar4Dv4_j(<4 x i32> %shr) #2
27  %1 = insertelement <4 x i8> %call1, i8 %0, i32 3
28  ret <4 x i8> %1
29}
30
31; Function Attrs: nounwind readnone
32declare <4 x i8> @_Z14convert_uchar4Dv4_j(<4 x i32>) #1
33
34; Function Attrs: nounwind readnone
35declare <4 x i32> @_Z13convert_uint4Dv4_h(<4 x i8>) #1
36
37attributes #0 = { nounwind readonly "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" }
38attributes #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" }
39attributes #2 = { nounwind readnone }
40
41!llvm.module.flags = !{!0, !1}
42!llvm.ident = !{!2}
43!\23pragma = !{!3, !4, !5}
44!\23rs_export_var = !{!6}
45!\23rs_object_slots = !{}
46!\23rs_export_foreach_name = !{!7, !8}
47!\23rs_export_foreach = !{!9, !10}
48
49!0 = !{i32 1, !"wchar_size", i32 4}
50!1 = !{i32 1, !"min_enum_size", i32 4}
51!2 = !{!"Android clang version 3.8.256229  (based on LLVM 3.8.256229)"}
52!3 = !{!"version", !"1"}
53!4 = !{!"java_package_name", !"rs2spirv"}
54!5 = !{!"rs_fp_relaxed", !""}
55!6 = !{!"alpha", !"7"}
56!7 = !{!"root"}
57!8 = !{!"setImageAlpha"}
58!9 = !{!"0"}
59!10 = !{!"59"}
60!11 = !{!12, !12, i64 0}
61!12 = !{!"omnipotent char", !13, i64 0}
62!13 = !{!"Simple C/C++ TBAA"}
63