summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/FunctionAttrs
diff options
context:
space:
mode:
authorJohannes Doerfert <jdoerfert@anl.gov>2019-10-13 03:54:08 +0000
committerJohannes Doerfert <jdoerfert@anl.gov>2019-10-13 03:54:08 +0000
commitd20f80780e053dfa3664858c9ac8be15951a035d (patch)
tree1813ee6127dcbd7a19089f92e583e3daa7b34517 /llvm/test/Transforms/FunctionAttrs
parent9daf51910b11081a24674cc0822b898a5e19347d (diff)
downloadbcm5719-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.ll5
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
+}
OpenPOWER on IntegriCloud