brintos

brintos / llvm-project-archived public Read only

0
0
Text · 4.2 KiB · 78285f6 Raw
92 lines · plain
1; RUN: llc -mtriple=hexagon -O3 < %s | FileCheck %s -check-prefix=BALIGN2; BALIGN: .p2align{{.*}}53 4; The test for checking the alignment of 'for.body4.for.body4_crit_edge' basic block5 6define dso_local void @foo(i32 %nCol, i32 %nRow, ptr nocapture %resMat) local_unnamed_addr {7entry:8  %shl = shl i32 %nRow, 29  %cmp36 = icmp sgt i32 %nRow, 010  %0 = add i32 %nCol, -111  %.inv = icmp slt i32 %0, 112  %1 = select i1 %.inv, i32 1, i32 %nCol13  br label %Outerloop14 15Outerloop:                                        ; preds = %for.end7, %entry16  %r12.0 = phi i32 [ 0, %entry ], [ %inc8, %for.end7 ]17  %r7_6.0 = phi i64 [ undef, %entry ], [ %r7_6.1.lcssa, %for.end7 ]18  %r0i.0 = phi i32 [ undef, %entry ], [ %r0i.1.lcssa, %for.end7 ]19  %r5.0 = phi ptr [ %resMat, %entry ], [ %r5.1.lcssa, %for.end7 ]20  %r8.0 = phi i32 [ %shl, %entry ], [ %r8.1.lcssa, %for.end7 ]21  br i1 %cmp36, label %for.body.lr.ph, label %for.end722 23for.body.lr.ph:                                   ; preds = %Outerloop24  %cmp332 = icmp eq i32 %r12.0, 025  %exitcond.peel = icmp eq i32 %r12.0, 126  br label %for.body27 28for.body:                                         ; preds = %for.end, %for.body.lr.ph29  %r8.141 = phi i32 [ %r8.0, %for.body.lr.ph ], [ %add, %for.end ]30  %r5.140 = phi ptr [ %r5.0, %for.body.lr.ph ], [ %add.ptr, %for.end ]31  %i.039 = phi i32 [ 0, %for.body.lr.ph ], [ %inc6, %for.end ]32  %r0i.138 = phi i32 [ %r0i.0, %for.body.lr.ph ], [ %4, %for.end ]33  %r7_6.137 = phi i64 [ %r7_6.0, %for.body.lr.ph ], [ %r7_6.2.lcssa, %for.end ]34  %add = add nsw i32 %r8.141, %shl35  br i1 %cmp332, label %for.end, label %for.body4.peel36 37for.body4.peel:                                   ; preds = %for.body38  %r1i.0.in.peel = inttoptr i32 %r8.141 to ptr39  %r1i.0.peel = load i32, ptr %r1i.0.in.peel, align 440  %2 = tail call i64 @llvm.hexagon.M2.dpmpyss.nac.s0(i64 %r7_6.137, i32 %r1i.0.peel, i32 %r0i.138)41  br i1 %exitcond.peel, label %for.end, label %for.body4.preheader.peel.newph42 43for.body4.preheader.peel.newph:                   ; preds = %for.body4.peel44  %r1i.0.in = inttoptr i32 %add to ptr45  %r1i.0 = load i32, ptr %r1i.0.in, align 446  br label %for.body447 48for.body4:                                        ; preds = %for.body4.for.body4_crit_edge, %for.body4.preheader.peel.newph49  %inc.phi = phi i32 [ %inc.0, %for.body4.for.body4_crit_edge ], [ 2, %for.body4.preheader.peel.newph ]50  %r7_6.233 = phi i64 [ %3, %for.body4.for.body4_crit_edge ], [ %2, %for.body4.preheader.peel.newph ]51  %3 = tail call i64 @llvm.hexagon.M2.dpmpyss.nac.s0(i64 %r7_6.233, i32 %r1i.0, i32 %r0i.138)52  %exitcond = icmp eq i32 %inc.phi, %r12.053  br i1 %exitcond, label %for.end.loopexit, label %for.body4.for.body4_crit_edge54 55for.body4.for.body4_crit_edge:                    ; preds = %for.body456  %inc.0 = add nuw nsw i32 %inc.phi, 157  br label %for.body458 59for.end.loopexit:                                 ; preds = %for.body460  br label %for.end61 62for.end:                                          ; preds = %for.end.loopexit, %for.body4.peel, %for.body63  %r7_6.2.lcssa = phi i64 [ %r7_6.137, %for.body ], [ %2, %for.body4.peel ], [ %3, %for.end.loopexit ]64  %4 = tail call i32 @llvm.hexagon.S2.clbp(i64 %r7_6.2.lcssa)65  store i32 %4, ptr %r5.140, align 466  %add.ptr = getelementptr inbounds i8, ptr %r5.140, i32 undef67  %inc6 = add nuw nsw i32 %i.039, 168  %exitcond47 = icmp eq i32 %inc6, %nRow69  br i1 %exitcond47, label %for.end7.loopexit, label %for.body70 71for.end7.loopexit:                                ; preds = %for.end72  br label %for.end773 74for.end7:                                         ; preds = %for.end7.loopexit, %Outerloop75  %r7_6.1.lcssa = phi i64 [ %r7_6.0, %Outerloop ], [ %r7_6.2.lcssa, %for.end7.loopexit ]76  %r0i.1.lcssa = phi i32 [ %r0i.0, %Outerloop ], [ %4, %for.end7.loopexit ]77  %r5.1.lcssa = phi ptr [ %r5.0, %Outerloop ], [ %add.ptr, %for.end7.loopexit ]78  %r8.1.lcssa = phi i32 [ %r8.0, %Outerloop ], [ %add, %for.end7.loopexit ]79  %inc8 = add nuw i32 %r12.0, 180  %exitcond48 = icmp eq i32 %inc8, %181  br i1 %exitcond48, label %if.end, label %Outerloop82 83if.end:                                           ; preds = %for.end784  ret void85}86 87; Function Attrs: nounwind readnone88declare i64 @llvm.hexagon.M2.dpmpyss.nac.s0(i64, i32, i32) 89 90; Function Attrs: nounwind readnone91declare i32 @llvm.hexagon.S2.clbp(i64)92