diff options
author | Stephen Hines <srhines@google.com> | 2015-03-23 12:10:34 -0700 |
---|---|---|
committer | Stephen Hines <srhines@google.com> | 2015-03-23 12:10:34 -0700 |
commit | ebe69fe11e48d322045d5949c83283927a0d790b (patch) | |
tree | c92f1907a6b8006628a4b01615f38264d29834ea /test/Transforms/LCSSA | |
parent | b7d2e72b02a4cb8034f32f8247a2558d2434e121 (diff) | |
download | external_llvm-ebe69fe11e48d322045d5949c83283927a0d790b.zip external_llvm-ebe69fe11e48d322045d5949c83283927a0d790b.tar.gz external_llvm-ebe69fe11e48d322045d5949c83283927a0d790b.tar.bz2 |
Update aosp/master LLVM for rebase to r230699.
Change-Id: I2b5be30509658cb8266be782de0ab24f9099f9b9
Diffstat (limited to 'test/Transforms/LCSSA')
-rw-r--r-- | test/Transforms/LCSSA/indirectbr.ll | 40 | ||||
-rw-r--r-- | test/Transforms/LCSSA/unreachable-use.ll | 4 |
2 files changed, 39 insertions, 5 deletions
diff --git a/test/Transforms/LCSSA/indirectbr.ll b/test/Transforms/LCSSA/indirectbr.ll index 9656448..345395b 100644 --- a/test/Transforms/LCSSA/indirectbr.ll +++ b/test/Transforms/LCSSA/indirectbr.ll @@ -1,11 +1,11 @@ -; RUN: opt < %s -lcssa -verify-loop-info -verify-dom-info -disable-output -; PR5437 +; RUN: opt < %s -loop-simplify -lcssa -verify-loop-info -verify-dom-info -S | FileCheck %s ; LCSSA should work correctly in the case of an indirectbr that exits ; the loop, and the loop has exits with predecessors not within the loop ; (and btw these edges are unsplittable due to the indirectbr). - -define i32 @js_Interpret() nounwind { +; PR5437 +define i32 @test0() nounwind { +; CHECK-LABEL: @test0 entry: br i1 undef, label %"4", label %"3" @@ -540,3 +540,35 @@ entry: "1862": ; preds = %"1836", %"692" unreachable } + +; An exit for Loop L1 may be the header of a disjoint Loop L2. Thus, when we +; create PHIs in one of such exits we are also inserting PHIs in L2 header. This +; could break LCSSA form for L2 because these inserted PHIs can also have uses +; in L2 exits. Test that we don't assert/crash on that. +define void @test1() { +; CHECK-LABEL: @test1 + br label %lab1 + +lab1: + %tmp21 = add i32 undef, 677038203 + br i1 undef, label %lab2, label %exit + +lab2: + indirectbr i8* undef, [label %lab1, label %lab3] + +lab3: +; CHECK: %tmp21.lcssa1 = phi i32 [ %tmp21.lcssa1, %lab4 ], [ %tmp21, %lab2 ] + %tmp12 = phi i32 [ %tmp21, %lab2 ], [ %tmp12, %lab4 ] + br i1 undef, label %lab5, label %lab4 + +lab4: + br label %lab3 + +lab5: +; CHECK: %tmp21.lcssa1.lcssa = phi i32 [ %tmp21.lcssa1, %lab3 ] + %tmp15 = add i32 %tmp12, undef + br label %exit + +exit: + ret void +} diff --git a/test/Transforms/LCSSA/unreachable-use.ll b/test/Transforms/LCSSA/unreachable-use.ll index 71ae134..2ea7aeb 100644 --- a/test/Transforms/LCSSA/unreachable-use.ll +++ b/test/Transforms/LCSSA/unreachable-use.ll @@ -1,9 +1,11 @@ -; RUN: opt < %s -lcssa -S -verify-loop-info | grep "[%]tmp33 = load i1\*\* [%]tmp" +; RUN: opt < %s -lcssa -S -verify-loop-info | FileCheck %s ; PR6546 ; LCSSA doesn't need to transform uses in blocks not reachable ; from the entry block. +; CHECK: %tmp33 = load i1** %tmp + define fastcc void @dfs() nounwind { bb: br label %bb44 |