diff options
author | Dan Gohman <djg@cray.com> | 2007-07-18 16:29:46 +0000 |
---|---|---|
committer | Dan Gohman <djg@cray.com> | 2007-07-18 16:29:46 +0000 |
commit | f17a25c88b892d30c2b41ba7ecdfbdfb2b4be9cc (patch) | |
tree | ebb79ea1ee5e3bc1fdf38541a811a8b804f0679a /test/Transforms/RaiseAllocations | |
download | external_llvm-f17a25c88b892d30c2b41ba7ecdfbdfb2b4be9cc.zip external_llvm-f17a25c88b892d30c2b41ba7ecdfbdfb2b4be9cc.tar.gz external_llvm-f17a25c88b892d30c2b41ba7ecdfbdfb2b4be9cc.tar.bz2 |
It's not necessary to do rounding for alloca operations when the requested
alignment is equal to the stack alignment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40004 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/RaiseAllocations')
-rw-r--r-- | test/Transforms/RaiseAllocations/2004-11-08-FreeUseCrash.ll | 10 | ||||
-rw-r--r-- | test/Transforms/RaiseAllocations/FreeCastConstantExpr.ll | 10 | ||||
-rw-r--r-- | test/Transforms/RaiseAllocations/dg.exp | 3 |
3 files changed, 23 insertions, 0 deletions
diff --git a/test/Transforms/RaiseAllocations/2004-11-08-FreeUseCrash.ll b/test/Transforms/RaiseAllocations/2004-11-08-FreeUseCrash.ll new file mode 100644 index 0000000..389047e --- /dev/null +++ b/test/Transforms/RaiseAllocations/2004-11-08-FreeUseCrash.ll @@ -0,0 +1,10 @@ +; RUN: llvm-upgrade < %s | llvm-as | opt -raiseallocs -disable-output +implementation ; Functions: + +void %main() { + %tmp.13 = call int (...)* %free( int 32 ) + %tmp.14 = cast int %tmp.13 to int* + ret void +} + +declare int %free(...) diff --git a/test/Transforms/RaiseAllocations/FreeCastConstantExpr.ll b/test/Transforms/RaiseAllocations/FreeCastConstantExpr.ll new file mode 100644 index 0000000..008aea4 --- /dev/null +++ b/test/Transforms/RaiseAllocations/FreeCastConstantExpr.ll @@ -0,0 +1,10 @@ +; This situation can occur due to the funcresolve pass. +; +; RUN: llvm-upgrade < %s | llvm-as | opt -raiseallocs | llvm-dis | not grep call + +declare void %free(sbyte*) + +void %test(int *%P) { + call void(int*)* cast (void(sbyte*)* %free to void(int*)*)(int* %P) + ret void +} diff --git a/test/Transforms/RaiseAllocations/dg.exp b/test/Transforms/RaiseAllocations/dg.exp new file mode 100644 index 0000000..879685c --- /dev/null +++ b/test/Transforms/RaiseAllocations/dg.exp @@ -0,0 +1,3 @@ +load_lib llvm.exp + +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] |