summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorStefan Stipanovic <sstipanovic@s-energize.com>2019-12-17 20:36:10 +0100
committerStefan Stipanovic <sstipanovic@s-energize.com>2019-12-17 20:36:10 +0100
commitd020e67575d9806d318787eec9d71828eab8f57a (patch)
tree17fd57ca5b148f348c4341fbf2e92cd588ce7927 /llvm/test
parent8aee6b414a8918993e9ae4cdabe67322ec0f6e63 (diff)
downloadbcm5719-llvm-d020e67575d9806d318787eec9d71828eab8f57a.tar.gz
bcm5719-llvm-d020e67575d9806d318787eec9d71828eab8f57a.zip
[Attributor][NFC] Add test for sle comparison in h2s.
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Transforms/Attributor/heap_to_stack.ll14
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/test/Transforms/Attributor/heap_to_stack.ll b/llvm/test/Transforms/Attributor/heap_to_stack.ll
index 1f7be75ef16..bac01253997 100644
--- a/llvm/test/Transforms/Attributor/heap_to_stack.ll
+++ b/llvm/test/Transforms/Attributor/heap_to_stack.ll
@@ -311,6 +311,20 @@ define i32 @test13() {
ret i32 %3
}
+define i32 @test_sle() {
+ %1 = tail call noalias i8* @malloc(i64 -1)
+ ; FIXME: This should not be transformed
+ ; CHECK: %1 = alloca i8, i64 -1
+ ; CHECK-NEXT: @no_sync_func(i8* noalias nocapture nofree %1)
+ tail call void @no_sync_func(i8* %1)
+ %2 = bitcast i8* %1 to i32*
+ store i32 10, i32* %2
+ %3 = load i32, i32* %2
+ tail call void @free(i8* %1)
+ ; CHECK-NOT: tail call void @free(i8* noalias %1)
+ ret i32 %3
+}
+
define void @test14() {
%1 = tail call noalias i8* @calloc(i64 64, i64 4)
; CHECK: %1 = tail call noalias i8* @calloc(i64 64, i64 4)
OpenPOWER on IntegriCloud