1 ; RUN: opt < %s -aa-pipeline=scev-aa -passes=loop-vectorize,print-alias-sets -S -o - 2>&1 | FileCheck %s
2 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
5 ; Just check that we don't crash on this test.
7 define void @foo(ptr noalias nocapture readonly %in, ptr noalias nocapture readonly %isCompressed, ptr noalias nocapture readonly %out) {
9 %in_0 = load ptr, ptr %in
10 %isCompressed_0 = load i32, ptr %isCompressed
11 %tmp2 = getelementptr ptr, ptr %in, i32 1
12 %in_1 = load ptr, ptr %tmp2
13 %tmp3 = getelementptr i32, ptr %isCompressed, i32 1
14 %isCompressed_1 = load i32, ptr %tmp3
15 br label %for_each_frames
18 %frameIndex = phi i32 [ 0, %entry_block ], [ %nextFrameIndex, %for_each_frames_end ]
19 %nextFrameIndex = add nuw nsw i32 %frameIndex, 2
20 br label %for_each_channel
23 %channelIndex = phi i32 [ 0, %for_each_frames ], [ %nextChannelIndex, %for_each_channel ]
24 %nextChannelIndex = add nuw nsw i32 %channelIndex, 1
25 %tmp4 = add i32 %frameIndex, %channelIndex
26 %tmp5 = xor i32 %isCompressed_0, 1
27 %tmp6 = mul i32 %frameIndex, %tmp5
28 %offset0 = add i32 %tmp6, %channelIndex
29 %tmp7 = getelementptr float, ptr %in_0, i32 %offset0
30 %in_0_index = load float, ptr %tmp7, align 4
31 %tmp8 = xor i32 %isCompressed_1, 1
32 %tmp9 = mul i32 %frameIndex, %tmp8
33 %offset1 = add i32 %tmp9, %channelIndex
34 %tmp10 = getelementptr float, ptr %in_1, i32 %offset1
35 %in_1_index = load float, ptr %tmp10, align 4
36 %tmp11 = fadd float %in_0_index, %in_1_index
37 %tmp12 = getelementptr float, ptr %out, i32 %tmp4
38 store float %tmp11, ptr %tmp12, align 4
39 %tmp13 = icmp eq i32 %nextChannelIndex, 2
40 br i1 %tmp13, label %for_each_frames_end, label %for_each_channel
43 %tmp14 = icmp eq i32 %nextFrameIndex, 512
44 br i1 %tmp14, label %return, label %for_each_frames