Clang] Fix expansion of response files in -Wp after integrated-cc1 change
[llvm-project.git] / polly / test / GPGPU / kernels-names-across-scops-funcs.ll
blobf92562233b675708ee4249a61308858e356bcfbb
1 ; RUN: opt %loadPolly -polly-process-unprofitable -polly-codegen-ppcg \
2 ; RUN: -polly-acc-dump-kernel-ir -disable-output < %s | \
3 ; RUN: FileCheck -check-prefix=KERNEL %s
5 ; REQUIRES: pollyacc
7 ; KERNEL: define ptx_kernel void @FUNC_foo_SCOP_0_KERNEL_0(i8 addrspace(1)* %MemRef_arg1, i32 %arg) #0 {
8 ; KERNEL: define ptx_kernel void @FUNC_foo_SCOP_1_KERNEL_0(i8 addrspace(1)* %MemRef_arg1, i32 %arg) #0 {
9 ; KERNEL: define ptx_kernel void @FUNC_foo2_SCOP_0_KERNEL_0(i8 addrspace(1)* %MemRef_arg1, i32 %arg) #0 {
11 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
13 ; Function Attrs: nounwind uwtable
14 define void @foo(i32 %arg, i32* %arg1) #0 {
15 bb:
16   br label %bb2
18 bb2:                                              ; preds = %bb
19   %tmp = icmp sgt i32 %arg, 0
20   br i1 %tmp, label %bb3, label %bb13
22 bb3:                                              ; preds = %bb2
23   br label %bb4
25 bb4:                                              ; preds = %bb4, %bb3
26   %tmp5 = phi i64 [ 0, %bb3 ], [ %tmp9, %bb4 ]
27   %tmp6 = getelementptr inbounds i32, i32* %arg1, i64 %tmp5
28   %tmp7 = load i32, i32* %tmp6, align 4, !tbaa !2
29   %tmp8 = add nsw i32 %tmp7, 1
30   store i32 %tmp8, i32* %tmp6, align 4, !tbaa !2
31   %tmp9 = add nuw nsw i64 %tmp5, 1
32   %tmp10 = zext i32 %arg to i64
33   %tmp11 = icmp ne i64 %tmp9, %tmp10
34   br i1 %tmp11, label %bb4, label %bb12
36 bb12:                                             ; preds = %bb4
37   br label %bb13
39 bb13:                                             ; preds = %bb12, %bb2
40   %tmp14 = tail call i64 @clock() #3
41   %tmp15 = icmp eq i64 %tmp14, 0
42   br i1 %tmp15, label %bb16, label %bb29
44 bb16:                                             ; preds = %bb13
45   %tmp17 = icmp sgt i32 %arg, 0
46   br i1 %tmp17, label %bb18, label %bb28
48 bb18:                                             ; preds = %bb16
49   br label %bb19
51 bb19:                                             ; preds = %bb19, %bb18
52   %tmp20 = phi i64 [ 0, %bb18 ], [ %tmp24, %bb19 ]
53   %tmp21 = getelementptr inbounds i32, i32* %arg1, i64 %tmp20
54   %tmp22 = load i32, i32* %tmp21, align 4, !tbaa !2
55   %tmp23 = add nsw i32 %tmp22, 1
56   store i32 %tmp23, i32* %tmp21, align 4, !tbaa !2
57   %tmp24 = add nuw nsw i64 %tmp20, 1
58   %tmp25 = zext i32 %arg to i64
59   %tmp26 = icmp ne i64 %tmp24, %tmp25
60   br i1 %tmp26, label %bb19, label %bb27
62 bb27:                                             ; preds = %bb19
63   br label %bb28
65 bb28:                                             ; preds = %bb27, %bb16
66   br label %bb29
68 bb29:                                             ; preds = %bb28, %bb13
69   ret void
72 ; Function Attrs: argmemonly nounwind
73 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #1
75 ; Function Attrs: nounwind
76 declare i64 @clock() #2
78 ; Function Attrs: argmemonly nounwind
79 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #1
81 ; Function Attrs: nounwind uwtable
82 define void @foo2(i32 %arg, i32* %arg1) #0 {
83 bb:
84   br label %bb2
86 bb2:                                              ; preds = %bb
87   %tmp = icmp sgt i32 %arg, 0
88   br i1 %tmp, label %bb3, label %bb13
90 bb3:                                              ; preds = %bb2
91   br label %bb4
93 bb4:                                              ; preds = %bb4, %bb3
94   %tmp5 = phi i64 [ 0, %bb3 ], [ %tmp9, %bb4 ]
95   %tmp6 = getelementptr inbounds i32, i32* %arg1, i64 %tmp5
96   %tmp7 = load i32, i32* %tmp6, align 4, !tbaa !2
97   %tmp8 = add nsw i32 %tmp7, 1
98   store i32 %tmp8, i32* %tmp6, align 4, !tbaa !2
99   %tmp9 = add nuw nsw i64 %tmp5, 1
100   %tmp10 = zext i32 %arg to i64
101   %tmp11 = icmp ne i64 %tmp9, %tmp10
102   br i1 %tmp11, label %bb4, label %bb12
104 bb12:                                             ; preds = %bb4
105   br label %bb13
107 bb13:                                             ; preds = %bb12, %bb2
108   ret void
111 attributes #0 = { nounwind uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="none" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
112 attributes #1 = { argmemonly nounwind }
113 attributes #2 = { nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="none" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
114 attributes #3 = { nounwind }
116 !llvm.module.flags = !{!0}
117 !llvm.ident = !{!1}
119 !0 = !{i32 1, !"wchar_size", i32 4}
120 !1 = !{!"clang version 5.0.0"}
121 !2 = !{!3, !3, i64 0}
122 !3 = !{!"int", !4, i64 0}
123 !4 = !{!"omnipotent char", !5, i64 0}
124 !5 = !{!"Simple C/C++ TBAA"}