Clang] Fix expansion of response files in -Wp after integrated-cc1 change
[llvm-project.git] / polly / test / GPGPU / failing-invariant-load-hoisting.ll
blobcfdd666af3b17aa23099a834e58557c60a181a2a
1 ; RUN: opt %loadPolly -S < %s -polly-codegen-ppcg \
2 ; RUN: -polly-invariant-load-hoisting | FileCheck %s -check-prefix=CODEGEN
4 ; REQUIRES: pollyacc
6 target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n8:16:32-S64"
8 %S = type { i32, i32, [12 x %L] }
9 %L = type { i32, i32, double, i32, i32, i32, i32, i32 }
11 define void @test(%S* %cpi, i1 %b) {
12 ; CODEGEN-LABEL: @test(
13 ; CODEGEN:    polly.preload.begin:
14 ; CODEGEN-NEXT:  br i1 false
16 entry:
17   %nt = getelementptr inbounds %S, %S* %cpi, i32 0, i32 1
18   br i1 %b, label %if.then14, label %exit
20 if.then14:
21   %ns = getelementptr inbounds %S, %S* %cpi, i32 0, i32 0
22   %l0 = load i32, i32* %ns, align 8
23   %cmp12.i = icmp sgt i32 %l0, 0
24   br i1 %cmp12.i, label %for.body.lr.ph.i, label %exit
26 for.body.lr.ph.i:
27   %l1 = load i32, i32* %nt, align 4
28   br label %for.body.i
30 for.body.i:
31   %phi = phi i32 [ 0, %for.body.lr.ph.i ], [ %inc, %for.body.i ]
32   %mul.i163 = mul nsw i32 %phi, %l1
33   %cv = getelementptr inbounds %S, %S* %cpi, i32 0, i32 2, i32 %mul.i163, i32 0
34   store i32 0, i32* %cv, align 8
35   %inc = add nuw nsw i32 %phi, 1
36   %l2 = load i32, i32* %ns, align 8
37   %cmp.i164 = icmp slt i32 %inc, %l2
38   br i1 %cmp.i164, label %for.body.i, label %exit
40 exit:
41   ret void