1; RUN: opt %loadPolly -polly-codegen -polly-invariant-load-hoisting=true \
2; RUN: -S < %s | FileCheck %s
3;
4; This test case checks whether Polly generates alias metadata in case of
5; the ublas gemm kernel and polly-invariant-load-hoisting.
6;
7; CHECK: store float 4.200000e+01, float* %polly.access.A.load, align 4, !alias.scope !3, !noalias !4
8;
9; CHECK: !0 = distinct !{!0, !1, !"polly.alias.scope.MemRef_A"}
10; CHECK-NEXT: !1 = distinct !{!1, !"polly.alias.scope.domain"}
11; CHECK-NEXT: !2 = !{!3}
12; CHECK-NEXT: !3 = distinct !{!3, !1, !"polly.alias.scope.MemRef_ptrA"}
13; CHECK-NEXT: !4 = !{!0}
14;
15target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
16target triple = "x86_64-unknown-linux-gnu"
17
18define void @nometadata(float** %A) {
19  entry:
20    br label %for
21
22  for:
23    %indvar = phi i64 [0, %entry], [%indvar.next, %for]
24    %indvar.next = add i64 %indvar, 1
25    %ptrA = load float*, float** %A
26    store float 42.0, float* %ptrA
27    %icmp = icmp sle i64 %indvar, 1024
28    br i1 %icmp, label %for, label %exit
29
30  exit:
31    ret void
32}
33