1 ; RUN: opt -passes='print<access-info>' -disable-output < %s 2>&1 | FileCheck %s
3 target datalayout = "e-m:e-i64:64-i128:128-n32:64-S128"
5 ; FIXME: This should be vectorizable
7 ; void vectorizable_Read_Write(int *A) {
8 ; for (unsigned i = 1022; i >= 0; i--)
12 ; CHECK: function 'vectorizable_Read_Write':
13 ; CHECK-NEXT: for.body:
14 ; CHECK-NEXT: Report: unsafe dependent memory operations in loop
15 ; CHECK-NEXT: Forward loop carried data dependence that prevents store-to-load forwarding.
16 ; CHECK-NEXT: Dependences:
17 ; CHECK-NEXT: ForwardButPreventsForwarding:
18 ; CHECK-NEXT: %0 = load i32, ptr %arrayidx, align 4 ->
19 ; CHECK-NEXT: store i32 %add, ptr %gep, align 4
21 define void @vectorizable_Read_Write(ptr nocapture %A) {
23 %invariant.gep = getelementptr i32, ptr %A, i64 1
30 %indvars.iv = phi i64 [ 1022, %entry ], [ %indvars.iv.next, %for.body ]
31 %arrayidx = getelementptr inbounds i32, ptr %A, i64 %indvars.iv
32 %0 = load i32, ptr %arrayidx, align 4
33 %add = add nsw i32 %0, 1
34 %gep = getelementptr i32, ptr %invariant.gep, i64 %indvars.iv
35 store i32 %add, ptr %gep, align 4
36 %indvars.iv.next = add nsw i64 %indvars.iv, -1
37 %cmp.not = icmp eq i64 %indvars.iv, 0
38 br i1 %cmp.not, label %for.cond.cleanup, label %for.body