diff options
Diffstat (limited to 'llvm/test/Transforms/SimplifyCFG/branch-fold-test.ll')
-rw-r--r-- | llvm/test/Transforms/SimplifyCFG/branch-fold-test.ll | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/llvm/test/Transforms/SimplifyCFG/branch-fold-test.ll b/llvm/test/Transforms/SimplifyCFG/branch-fold-test.ll index 3bbb101ef47..2deca406345 100644 --- a/llvm/test/Transforms/SimplifyCFG/branch-fold-test.ll +++ b/llvm/test/Transforms/SimplifyCFG/branch-fold-test.ll @@ -1,16 +1,17 @@ ; This test ensures that the simplifycfg pass continues to constant fold ; terminator instructions. -; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | not grep br +; RUN: llvm-as < %s | opt -simplifycfg | not grep br -int %test(int %A, int %B) { +define i32 @test(i32 %A, i32 %B) { J: - %C = add int %A, 12 - br bool true, label %L, label %K ; K is dead! -L: - %D = add int %C, %B - ret int %D -K: - %E = add int %C, %B - ret int %E + %C = add i32 %A, 12 ; <i32> [#uses=2] + br i1 true, label %L, label %K +L: ; preds = %J + %D = add i32 %C, %B ; <i32> [#uses=1] + ret i32 %D +K: ; preds = %J + %E = add i32 %C, %B ; <i32> [#uses=1] + ret i32 %E } + |