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 [[FuncId1:%[0-9]+]] "entry_invert" %gl_GlobalInvocationID
7; CHECK-NEXT: OpEntryPoint GLCompute [[FuncId2:%[0-9]+]] "entry_scalebytwo" %gl_GlobalInvocationID
8
9; Multi-kernel testcase
10;float4 RS_KERNEL invert(float4 a) {
11;    return 1.0f - a;
12;}
13
14; CHECK: [[FuncId1]] = OpFunction %void None
15; Function Attrs: norecurse nounwind readnone
16define <4 x float> @invert(<4 x float> %a) local_unnamed_addr #0 {
17entry:
18  %sub = fsub <4 x float> <float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00>, %a
19  ret <4 x float> %sub
20}
21
22
23; CHECK: [[FuncId2]] = OpFunction %void None
24;float RS_KERNEL scalebytwo(float a) {
25;    return a*2;
26;}
27
28; Function Attrs: norecurse nounwind readnone
29define float @scalebytwo(float %a) local_unnamed_addr #0 {
30entry:
31  %mul = fmul float %a, 2.000000e+00
32  ret float %mul
33}
34
35attributes #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" }
36
37!llvm.module.flags = !{!0, !1}
38!llvm.ident = !{!2}
39!\23pragma = !{!3, !4}
40!\23rs_export_foreach_name = !{!5, !6, !7}
41!\23rs_export_foreach = !{!8, !9, !9}
42
43!0 = !{i32 1, !"wchar_size", i32 4}
44!1 = !{i32 1, !"min_enum_size", i32 4}
45!2 = !{!"Android clang version 3.8.275480  (based on LLVM 3.8.275480)"}
46!3 = !{!"version", !"1"}
47!4 = !{!"java_package_name", !"com.android.rs.rsov.test"}
48!5 = !{!"root"}
49!6 = !{!"invert"}
50!7 = !{!"scalebytwo"}
51!8 = !{!"0"}
52!9 = !{!"35"}
53