diff options
author | Chris Lattner <sabre@nondot.org> | 2011-01-16 08:09:24 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-01-16 08:09:24 +0000 |
commit | 28252b6f0a483ffb0ead991c7a1ead14e3cd2fc1 (patch) | |
tree | 37f9a090050879c3c2c202697cf765eb033ca4b7 /test/Transforms/ArgumentPromotion/crash.ll | |
parent | 54cfe7e027ee56799f3d597fd5095394f66e0ff0 (diff) | |
download | external_llvm-28252b6f0a483ffb0ead991c7a1ead14e3cd2fc1.zip external_llvm-28252b6f0a483ffb0ead991c7a1ead14e3cd2fc1.tar.gz external_llvm-28252b6f0a483ffb0ead991c7a1ead14e3cd2fc1.tar.bz2 |
fix PR8932, a case where arg promotion could infinitely promote.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123574 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/ArgumentPromotion/crash.ll')
-rw-r--r-- | test/Transforms/ArgumentPromotion/crash.ll | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/Transforms/ArgumentPromotion/crash.ll b/test/Transforms/ArgumentPromotion/crash.ll index e2d3d4d..fed002a 100644 --- a/test/Transforms/ArgumentPromotion/crash.ll +++ b/test/Transforms/ArgumentPromotion/crash.ll @@ -36,3 +36,24 @@ entry: ret i1 undef } + +; PR8932 - infinite promotion. +%0 = type { %0* } + +define i32 @test2(i32 %a) { +init: + %0 = alloca %0 + %1 = alloca %0 + %2 = call i32 @"clay_assign(Chain, Chain)"(%0* %0, %0* %1) + ret i32 0 +} + +define internal i32 @"clay_assign(Chain, Chain)"(%0* %c, %0* %d) { +init: + %0 = getelementptr %0* %d, i32 0, i32 0 + %1 = load %0** %0 + %2 = getelementptr %0* %c, i32 0, i32 0 + %3 = load %0** %2 + %4 = call i32 @"clay_assign(Chain, Chain)"(%0* %3, %0* %1) + ret i32 0 +} |