brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.3 KiB · c35d4f3 Raw
52 lines · plain
1; RUN: opt -disable-output -passes='print<access-info>' %s 2>&1 | FileCheck %s --check-prefixes=CHECK,FULLDEPTH2; RUN: opt -disable-output -passes='print<access-info>' -max-forked-scev-depth=2 %s 2>&1 | FileCheck %s --check-prefixes=CHECK,DEPTH23 4define void @laa_common_output(ptr %Base, ptr %Dest, ptr %Preds) {5entry:6  br label %for.body7 8for.cond.cleanup:                                 ; preds = %for.body9  ret void10 11for.body:                                         ; preds = %entry, %for.body12  %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]13  %i.014 = phi i32 [ 0, %entry ], [ %add, %for.body ]14  %arrayidx = getelementptr inbounds i32, ptr %Preds, i64 %indvars.iv15  %0 = load i32, ptr %arrayidx, align 416  %cmp1.not = icmp eq i32 %0, 017  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 118  %add = add nuw nsw i32 %i.014, 119  %1 = trunc i64 %indvars.iv to i3220  %offset.0 = select i1 %cmp1.not, i32 %add, i32 %121  %idxprom213 = zext i32 %offset.0 to i6422  %arrayidx3 = getelementptr inbounds float, ptr %Base, i64 %idxprom21323  %2 = load float, ptr %arrayidx3, align 424  %arrayidx5 = getelementptr inbounds float, ptr %Dest, i64 %indvars.iv25  store float %2, ptr %arrayidx5, align 426  %exitcond.not = icmp eq i64 %indvars.iv.next, 10027  br i1 %exitcond.not, label %for.cond.cleanup, label %for.body28}29 30define void @laa_divergent_output(ptr %Base, ptr %Dest, ptr %Preds, i64 %extra_offset) {31entry:32  br label %for.body33 34for.cond.cleanup:                                 ; preds = %for.body35  ret void36 37for.body:                                         ; preds = %entry, %for.body38  %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]39  %arrayidx = getelementptr inbounds i32, ptr %Preds, i64 %indvars.iv40  %0 = load i32, ptr %arrayidx, align 441  %cmp.not = icmp eq i32 %0, 042  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 143  %sel = select i1 %cmp.not, i64 %indvars.iv.next, i64 %indvars.iv44  %offset = add nuw nsw i64 %sel, %extra_offset45  %arrayidx3 = getelementptr inbounds float, ptr %Base, i64 %offset46  %1 = load float, ptr %arrayidx3, align 447  %arrayidx5 = getelementptr inbounds float, ptr %Dest, i64 %indvars.iv48  store float %1, ptr %arrayidx5, align 449  %exitcond.not = icmp eq i64 %indvars.iv.next, 10050  br i1 %exitcond.not, label %for.cond.cleanup, label %for.body51}52