diff options
author | Stephen Hines <srhines@google.com> | 2015-04-01 18:49:24 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-04-01 18:49:26 +0000 |
commit | 3fa16bd6062e23bcdb82ed4dd965674792e6b761 (patch) | |
tree | 9348fc507292f7e8715d22d64ce5a32131b4f875 /test/Transforms/LoopReroll/reduction.ll | |
parent | beed47390a60f6f0c77532b3d3f76bb47ef49423 (diff) | |
parent | ebe69fe11e48d322045d5949c83283927a0d790b (diff) | |
download | external_llvm-3fa16bd6062e23bcdb82ed4dd965674792e6b761.zip external_llvm-3fa16bd6062e23bcdb82ed4dd965674792e6b761.tar.gz external_llvm-3fa16bd6062e23bcdb82ed4dd965674792e6b761.tar.bz2 |
Merge "Update aosp/master LLVM for rebase to r230699."
Diffstat (limited to 'test/Transforms/LoopReroll/reduction.ll')
-rw-r--r-- | test/Transforms/LoopReroll/reduction.ll | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/test/Transforms/LoopReroll/reduction.ll b/test/Transforms/LoopReroll/reduction.ll index c9991c7..a4f168a 100644 --- a/test/Transforms/LoopReroll/reduction.ll +++ b/test/Transforms/LoopReroll/reduction.ll @@ -92,5 +92,41 @@ for.end: ; preds = %for.body ret float %add12 } +define i32 @foo_unusedphi(i32* nocapture readonly %x) #0 { +entry: + br label %for.body + +for.body: ; preds = %entry, %for.body + %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] + %r.029 = phi i32 [ 0, %entry ], [ %add12, %for.body ] + %arrayidx = getelementptr inbounds i32* %x, i64 %indvars.iv + %0 = load i32* %arrayidx, align 4 + %add = add nsw i32 %0, %0 + %1 = or i64 %indvars.iv, 1 + %arrayidx3 = getelementptr inbounds i32* %x, i64 %1 + %2 = load i32* %arrayidx3, align 4 + %add4 = add nsw i32 %add, %2 + %3 = or i64 %indvars.iv, 2 + %arrayidx7 = getelementptr inbounds i32* %x, i64 %3 + %4 = load i32* %arrayidx7, align 4 + %add8 = add nsw i32 %add4, %4 + %5 = or i64 %indvars.iv, 3 + %arrayidx11 = getelementptr inbounds i32* %x, i64 %5 + %6 = load i32* %arrayidx11, align 4 + %add12 = add nsw i32 %add8, %6 + %indvars.iv.next = add nuw nsw i64 %indvars.iv, 4 + %7 = trunc i64 %indvars.iv.next to i32 + %cmp = icmp slt i32 %7, 400 + br i1 %cmp, label %for.body, label %for.end + +; CHECK-LABEL: @foo_unusedphi +; The above is just testing for a crash - no specific output expected. + +; CHECK: ret + +for.end: ; preds = %for.body + ret i32 %add12 +} + attributes #0 = { nounwind readonly uwtable } |