diff options
author | Nuno Lopes <nunoplopes@sapo.pt> | 2012-06-21 16:47:58 +0000 |
---|---|---|
committer | Nuno Lopes <nunoplopes@sapo.pt> | 2012-06-21 16:47:58 +0000 |
commit | 034dd6c6a118cf78ebfa6bf3496cd5b0df578a9e (patch) | |
tree | 6d9f8dd60938d01252246410d302c4afad75a9fe /test/Transforms | |
parent | 7f5847270a650614b45f756e1a86502613be4921 (diff) | |
download | external_llvm-034dd6c6a118cf78ebfa6bf3496cd5b0df578a9e.zip external_llvm-034dd6c6a118cf78ebfa6bf3496cd5b0df578a9e.tar.gz external_llvm-034dd6c6a118cf78ebfa6bf3496cd5b0df578a9e.tar.bz2 |
hopefully fix the buildbots: some tests have wrong definitions of malloc and were crashing this code on 64 bits machines
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158923 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms')
-rw-r--r-- | test/Transforms/InstCombine/objsize-64.ll | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/objsize-64.ll b/test/Transforms/InstCombine/objsize-64.ll new file mode 100644 index 0000000..d903f1e --- /dev/null +++ b/test/Transforms/InstCombine/objsize-64.ll @@ -0,0 +1,13 @@ +; RUN: opt < %s -instcombine -S | FileCheck %s +target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" + +declare noalias i8* @malloc(i32) nounwind +declare i64 @llvm.objectsize.i64(i8*, i1) nounwind readonly + +; CHECK: @f1 +define i64 @f1() { + %call = call i8* @malloc(i32 4) + %size = call i64 @llvm.objectsize.i64(i8* %call, i1 false) +; CHECK-NEXT: ret i64 4 + ret i64 %size +} |