diff options
| author | Johannes Doerfert <jdoerfert@anl.gov> | 2019-10-13 03:54:08 +0000 |
|---|---|---|
| committer | Johannes Doerfert <jdoerfert@anl.gov> | 2019-10-13 03:54:08 +0000 |
| commit | d20f80780e053dfa3664858c9ac8be15951a035d (patch) | |
| tree | 1813ee6127dcbd7a19089f92e583e3daa7b34517 /llvm/test/Transforms/FunctionAttrs | |
| parent | 9daf51910b11081a24674cc0822b898a5e19347d (diff) | |
| download | bcm5719-llvm-d20f80780e053dfa3664858c9ac8be15951a035d.tar.gz bcm5719-llvm-d20f80780e053dfa3664858c9ac8be15951a035d.zip | |
[Attributor][FIX] Do not apply h2s for arbitrary mallocs
H2S did apply to mallocs of non-constant sizes if the uses were OK. This
is now forbidden through reording of the "good" and "bad" cases in the
conditional.
llvm-svn: 374698
Diffstat (limited to 'llvm/test/Transforms/FunctionAttrs')
| -rw-r--r-- | llvm/test/Transforms/FunctionAttrs/heap_to_stack.ll | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/test/Transforms/FunctionAttrs/heap_to_stack.ll b/llvm/test/Transforms/FunctionAttrs/heap_to_stack.ll index 26a778be841..542b233770c 100644 --- a/llvm/test/Transforms/FunctionAttrs/heap_to_stack.ll +++ b/llvm/test/Transforms/FunctionAttrs/heap_to_stack.ll @@ -316,3 +316,8 @@ define void @test14() { ; CHECK: tail call void @free(i8* noalias %1) ret void } + +define void @test15(i64 %S) { + %1 = tail call noalias i8* @malloc(i64 %S) + ret void +} |

