1 ; RUN: opt %loadNPMPolly -passes=polly-codegen -S < %s | FileCheck %s
4 ; Use of ScalarEvolution in Codegen not possible because DominatorTree is not updated.
6 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
8 define dso_local void @func(i1 %b, i1 %p3, ptr %d) local_unnamed_addr {
10 %conv = zext i1 %b to i16
11 %add = select i1 %p3, i32 21, i32 20
12 br label %for.body.us.us
15 %e.062.us.us = phi i16 [ %inc.us.us, %omp.inner.for.cond.simd.if.end.loopexit_crit_edge.us.us ], [ %conv, %entry ]
16 %idxprom.us.us = sext i16 %e.062.us.us to i64
17 br i1 %b, label %omp.inner.for.body.us.us.us.preheader, label %omp.inner.for.body.us63.us.preheader
19 omp.inner.for.body.us63.us.preheader:
20 %arrayidx25.us.le71.us = getelementptr inbounds [14 x i32], ptr %d, i64 %idxprom.us.us, i64 0
21 %0 = load i32, ptr %arrayidx25.us.le71.us, align 4
22 br label %omp.inner.for.cond.simd.if.end.loopexit_crit_edge.us.us
24 omp.inner.for.body.us.us.us.preheader:
25 %arrayidx25.us.le.us.us = getelementptr inbounds [14 x i32], ptr %d, i64 %idxprom.us.us, i64 0
26 %1 = load i32, ptr %arrayidx25.us.le.us.us, align 4
27 %conv27.us.le.us.us = select i1 undef, i16 0, i16 undef
28 br label %omp.inner.for.cond.simd.if.end.loopexit_crit_edge.us.us
30 omp.inner.for.cond.simd.if.end.loopexit_crit_edge.us.us:
31 %conv27.lcssa.us.us = phi i16 [ undef, %omp.inner.for.body.us63.us.preheader ], [ %conv27.us.le.us.us, %omp.inner.for.body.us.us.us.preheader ]
32 %inc.us.us = add i16 %e.062.us.us, 1
33 %conv2.us.us = sext i16 %inc.us.us to i32
34 %cmp.us.us = icmp sgt i32 %add, %conv2.us.us
35 br i1 %cmp.us.us, label %for.body.us.us, label %for.cond.cleanup.loopexit
37 for.cond.cleanup.loopexit:
43 ; CHECK: polly.stmt.omp.inner.for.body.us.us.us.preheader:
44 ; CHECK: load i32, ptr %scevgep, align 4, !alias.scope !0, !noalias !3
47 ; CHECK: !1 = distinct !{!1, !2, !"polly.alias.scope.MemRef_d"}
48 ; CHECK: !2 = distinct !{!2, !"polly.alias.scope.domain"}