Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
llvm/test/CodeGen/PowerPC/ctrloop-shortLoops.ll
Show First 20 Lines • Show All 80 Lines • ▼ Show 20 Lines | for.body: ; preds = %entry, %for.body | ||||
%0 = load i32, i32* %arrayidx, align 4 | %0 = load i32, i32* %arrayidx, align 4 | ||||
%add = add nsw i32 %0, %Sum.05 | %add = add nsw i32 %0, %Sum.05 | ||||
%indvars.iv.next = add nsw i64 %indvars.iv, -1 | %indvars.iv.next = add nsw i64 %indvars.iv, -1 | ||||
%tobool = icmp eq i64 %indvars.iv, 0 | %tobool = icmp eq i64 %indvars.iv, 0 | ||||
br i1 %tobool, label %for.cond.cleanup, label %for.body | br i1 %tobool, label %for.cond.cleanup, label %for.body | ||||
} | } | ||||
; Function Attrs: norecurse nounwind | ; Function Attrs: norecurse nounwind | ||||
; On core a2q, IssueWidth is 1. On core pwr8, IssueWidth is 8. | |||||
; a2q should use mtctr, but pwr8 should not use mtctr. | |||||
define signext i32 @testTripCount2NonSmallLoop() { | define signext i32 @testTripCount2NonSmallLoop() { | ||||
; CHECK-LABEL: testTripCount2NonSmallLoop: | ; CHECK-LABEL: testTripCount2NonSmallLoop: | ||||
; CHECK: blt | ; CHECK-A2Q: mtctr | ||||
; CHECK: beq | ; CHECK-PWR8-NOT: mtctr | ||||
; CHECK: blr | ; CHECK: blr | ||||
entry: | entry: | ||||
%.pre = load i32, i32* @a, align 4 | %.pre = load i32, i32* @a, align 4 | ||||
br label %for.body | br label %for.body | ||||
for.body: ; preds = %entry, %if.end | for.body: ; preds = %entry, %if.end | ||||
%0 = phi i32 [ %.pre, %entry ], [ %1, %if.end ] | %0 = phi i32 [ %.pre, %entry ], [ %1, %if.end ] | ||||
▲ Show 20 Lines • Show All 65 Lines • Show Last 20 Lines |