1 ; RUN: opt %loadPolly -polly-print-scops -polly-allow-differing-element-types -disable-output < %s | FileCheck %s
3 ; void multiple_types(i8 *A) {
4 ; for (long i = 0; i < 100; i++) {
5 ; A[i] = *(i128 *)&A[16 * i] +
12 ; CHECK: i64 MemRef_A[*]; // Element size 8
14 ; CHECK: Arrays (Bounds as pw_affs) {
15 ; CHECK: i64 MemRef_A[*]; // Element size 8
17 ; CHECK: Alias Groups (0):
22 ; CHECK: { Stmt_bb2[i0] : 0 <= i0 <= 99 };
24 ; CHECK: { Stmt_bb2[i0] -> [i0] };
25 ; CHECK: ReadAccess := [Reduction Type: NONE] [Scalar: 0]
26 ; CHECK: { Stmt_bb2[i0] -> MemRef_A[o0] : 2i0 <= o0 <= 1 + 2i0 }
27 ; CHECK: ReadAccess := [Reduction Type: NONE] [Scalar: 0]
28 ; CHECK: { Stmt_bb2[i0] -> MemRef_A[o0] : 3i0 <= o0 <= 2 + 3i0 }
29 ; CHECK: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0]
30 ; CHECK: { Stmt_bb2[i0] -> MemRef_A[o0] : 2i0 <= o0 <= 1 + 2i0 }
33 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
35 define void @multiple_types(ptr %A) {
39 bb1: ; preds = %bb20, %bb
40 %i.0 = phi i64 [ 0, %bb ], [ %tmp21, %bb20 ]
41 %exitcond = icmp ne i64 %i.0, 100
42 br i1 %exitcond, label %bb2, label %bb22
45 %load.i128.offset = mul i64 %i.0, 16
46 %load.i128.ptr = getelementptr inbounds i8, ptr %A, i64 %load.i128.offset
47 %load.i128.val = load i128, ptr %load.i128.ptr
49 %load.i192.offset = mul i64 %i.0, 24
50 %load.i192.ptr = getelementptr inbounds i8, ptr %A, i64 %load.i192.offset
51 %load.i192.val = load i192, ptr %load.i192.ptr
52 %load.i192.val.trunc = trunc i192 %load.i192.val to i128
54 %sum = add i128 %load.i128.val, %load.i192.val.trunc
55 store i128 %sum, ptr %load.i128.ptr
59 %tmp21 = add nuw nsw i64 %i.0, 1