brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1002 B · e6b6d17 Raw
34 lines · plain
1; RUN: opt < %s -passes='print<loop-cache-cost>' -disable-output2 3; Ensure no crash happens after PR #1647984 5target datalayout = "p21:32:16"6 7define i16 @f() {8entry:9  br label %for.cond1.preheader10 11for.cond1.preheader:12  %i.02 = phi i16 [ 0, %entry ], [ %inc8, %for.cond.cleanup3 ]13  %idxprom = zext i16 %i.02 to i3214  %arrayidx = getelementptr [18 x i16], ptr addrspace(21) null, i32 %idxprom15  br label %for.body416 17for.cond.cleanup:18  ret i16 019 20for.cond.cleanup3:21  %inc8 = add i16 %i.02, 122  %exitcond3.not = icmp eq i16 %inc8, 023  br i1 %exitcond3.not, label %for.cond.cleanup, label %for.cond1.preheader24 25for.body4:26  %j.01 = phi i16 [ 0, %for.cond1.preheader ], [ %inc.2, %for.body4 ]27  %idxprom5 = zext i16 %j.01 to i3228  %arrayidx6 = getelementptr i16, ptr addrspace(21) %arrayidx, i32 %idxprom529  store i16 0, ptr addrspace(21) %arrayidx6, align 130  %inc.2 = add i16 %j.01, 131  %exitcond.not.2 = icmp eq i16 %inc.2, 1832  br i1 %exitcond.not.2, label %for.cond.cleanup3, label %for.body433}34