1; Expecting validation failure
2; RUN: not rs2spirv_lit_driver.sh %s
3
4target datalayout = "e-m:e-i64:64-i128:128-n32:64-S128"
5target triple = "aarch64-none-linux-gnueabi"
6
7; Function Attrs: nounwind readnone
8; CHECK: OpEntryPoint GLCompute %{{[a-zA-Z_0-9]*}} "entry_fib" %gl_GlobalInvocationID
9define i32 @fib(i32 %n) #0 {
10entry:
11  %n.off8 = add i32 %n, -1
12  %0 = icmp ult i32 %n.off8, 2
13  br i1 %0, label %return, label %if.end
14
15if.end:                                           ; preds = %entry, %if.end
16  %n.tr10 = phi i32 [ %sub2, %if.end ], [ %n, %entry ]
17  %accumulator.tr9 = phi i32 [ %add, %if.end ], [ 1, %entry ]
18  %sub = add nsw i32 %n.tr10, -1
19  %call = tail call i32 @fib(i32 %sub)
20  %sub2 = add nsw i32 %n.tr10, -2
21  %add = add nsw i32 %call, %accumulator.tr9
22  %n.off = add i32 %n.tr10, -3
23  %1 = icmp ult i32 %n.off, 2
24  br i1 %1, label %return, label %if.end
25
26return:                                           ; preds = %if.end, %entry
27  %accumulator.tr.lcssa = phi i32 [ 1, %entry ], [ %add, %if.end ]
28  ret i32 %accumulator.tr.lcssa
29}
30
31attributes #0 = { 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" "unsafe-fp-math"="false" "use-soft-float"="false" }
32
33!llvm.ident = !{!0}
34!\23pragma = !{!1, !2, !3}
35!\23rs_export_foreach_name = !{!4, !5}
36!\23rs_export_foreach = !{!6, !7}
37
38!0 = !{!"Android clang version 3.8.256229  (based on LLVM 3.8.256229)"}
39!1 = !{!"version", !"1"}
40!2 = !{!"java_package_name", !"rs2spirv"}
41!3 = !{!"rs_fp_relaxed", !""}
42!4 = !{!"root"}
43!5 = !{!"fib"}
44!6 = !{!"0"}
45!7 = !{!"35"}
46