From 034dd6c6a118cf78ebfa6bf3496cd5b0df578a9e Mon Sep 17 00:00:00 2001 From: Nuno Lopes Date: Thu, 21 Jun 2012 16:47:58 +0000 Subject: 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 --- test/Transforms/InstCombine/objsize-64.ll | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 test/Transforms/InstCombine/objsize-64.ll (limited to 'test/Transforms') 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 +} -- cgit v1.1