diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2012-12-17 18:48:07 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2012-12-17 18:48:07 +0000 |
commit | b0de1e31d11056037c4db3e2ecfe1547e85c3e1c (patch) | |
tree | 3565004b2e1a2f4bb5e232bdd510a90465586383 /test/Transforms | |
parent | 788221398a2cdb219c37625b5176211e7c7d44a6 (diff) | |
download | external_llvm-b0de1e31d11056037c4db3e2ecfe1547e85c3e1c.zip external_llvm-b0de1e31d11056037c4db3e2ecfe1547e85c3e1c.tar.gz external_llvm-b0de1e31d11056037c4db3e2ecfe1547e85c3e1c.tar.bz2 |
Fix another SROA crasher, PR14601.
This was a silly oversight, we weren't pruning allocas which were used
by variable-length memory intrinsics from the set that could be widened
and promoted as integers. Fix that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170353 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms')
-rw-r--r-- | test/Transforms/SROA/basictest.ll | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/Transforms/SROA/basictest.ll b/test/Transforms/SROA/basictest.ll index 7856a7e..efc01ac 100644 --- a/test/Transforms/SROA/basictest.ll +++ b/test/Transforms/SROA/basictest.ll @@ -1208,3 +1208,18 @@ entry: ret i32 %y ; CHECK: ret i32 } + +define i32 @PR14601(i32 %x) { +; Don't try to form a promotable integer alloca when there is a variable length +; memory intrinsic. +; CHECK: @PR14601 + +entry: + %a = alloca i32 +; CHECK: alloca + + %a.i8 = bitcast i32* %a to i8* + call void @llvm.memset.p0i8.i32(i8* %a.i8, i8 0, i32 %x, i32 1, i1 false) + %v = load i32* %a + ret i32 %v +} |