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/IndVarSimplify/pr22222.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/IndVarSimplify/pr22222.ll')
-rw-r--r-- | test/Transforms/IndVarSimplify/pr22222.ll | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/test/Transforms/IndVarSimplify/pr22222.ll b/test/Transforms/IndVarSimplify/pr22222.ll new file mode 100644 index 0000000..ccdfe53 --- /dev/null +++ b/test/Transforms/IndVarSimplify/pr22222.ll @@ -0,0 +1,46 @@ +; RUN: opt -indvars -S < %s | FileCheck %s + +@b = common global i32 0, align 4 +@c = common global i32 0, align 4 +@a = common global i32 0, align 4 + +declare void @abort() #1 + +; Function Attrs: nounwind ssp uwtable +define i32 @main() { +entry: + %a.promoted13 = load i32* @a, align 4 + br label %for.cond1.preheader + +for.cond1.preheader: ; preds = %entry, %for.end + %or.lcssa14 = phi i32 [ %a.promoted13, %entry ], [ %or.lcssa, %for.end ] + %d.010 = phi i32 [ 1, %entry ], [ 0, %for.end ] + br label %for.body3 + +for.body3: ; preds = %for.cond1.preheader, %for.body3 + %inc12 = phi i32 [ 0, %for.cond1.preheader ], [ %inc, %for.body3 ] + %or11 = phi i32 [ %or.lcssa14, %for.cond1.preheader ], [ %or, %for.body3 ] +; CHECK-NOT: sub nuw i32 %inc12, %d.010 +; CHECK: sub i32 %inc12, %d.010 + %add = sub i32 %inc12, %d.010 + %or = or i32 %or11, %add + %inc = add i32 %inc12, 1 + br i1 false, label %for.body3, label %for.end + +for.end: ; preds = %for.body3 + %or.lcssa = phi i32 [ %or, %for.body3 ] + br i1 false, label %for.cond1.preheader, label %for.end6 + +for.end6: ; preds = %for.end + %or.lcssa.lcssa = phi i32 [ %or.lcssa, %for.end ] + store i32 %or.lcssa.lcssa, i32* @a, align 4 + %cmp7 = icmp eq i32 %or.lcssa.lcssa, -1 + br i1 %cmp7, label %if.end, label %if.then + +if.then: ; preds = %for.end6 + tail call void @abort() #2 + unreachable + +if.end: ; preds = %for.end6 + ret i32 0 +} |