brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 4ba5677 Raw
43 lines · plain
1; RUN: llc -mtriple=hexagon -mcpu=hexagonv5 -enable-pipeliner -pipeliner-max-stages=2 < %s2; REQUIRES: asserts3 4; This tests check that a dependence is created between a Phi and it's uses.5; An assert occurs if the Phi dependences are not correct.6 7define void @test1(ptr %f2, i32 %nc) {8entry:9  %i.011 = add i32 %nc, -110  %cmp12 = icmp sgt i32 %i.011, 111  br i1 %cmp12, label %for.body.preheader, label %for.end12 13for.body.preheader:14  %0 = add i32 %nc, -215  %scevgep = getelementptr i32, ptr %f2, i32 %016  %sri = load i32, ptr %scevgep, align 417  %scevgep15 = getelementptr i32, ptr %f2, i32 %i.01118  %sri16 = load i32, ptr %scevgep15, align 419  br label %for.body20 21for.body:22  %i.014 = phi i32 [ %i.0, %for.body ], [ %i.011, %for.body.preheader ]23  %i.0.in13 = phi i32 [ %i.014, %for.body ], [ %nc, %for.body.preheader ]24  %sr = phi i32 [ %1, %for.body ], [ %sri, %for.body.preheader ]25  %sr17 = phi i32 [ %sr, %for.body ], [ %sri16, %for.body.preheader ]26  %arrayidx = getelementptr inbounds i32, ptr %f2, i32 %i.01427  %sub1 = add nsw i32 %i.0.in13, -328  %arrayidx2 = getelementptr inbounds i32, ptr %f2, i32 %sub129  %1 = load i32, ptr %arrayidx2, align 430  %sub3 = sub nsw i32 %sr17, %131  store i32 %sub3, ptr %arrayidx, align 432  %i.0 = add nsw i32 %i.014, -133  %cmp = icmp sgt i32 %i.0, 134  br i1 %cmp, label %for.body, label %for.end.loopexit35 36for.end.loopexit:37  br label %for.end38 39for.end:40  ret void41}42 43