diff options
author | Eric Christopher <echristo@apple.com> | 2010-04-12 04:48:00 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2010-04-12 04:48:00 +0000 |
commit | 1f272f7fd851d1fbc51e9e4373fc2be960492288 (patch) | |
tree | 14247d0030c87be3536fd6d34bce714631a84238 /llvm/test/Transforms/InstCombine/objsize.ll | |
parent | ecd40a34e248a8010f3872d3647510e99ca82150 (diff) | |
download | bcm5719-llvm-1f272f7fd851d1fbc51e9e4373fc2be960492288.tar.gz bcm5719-llvm-1f272f7fd851d1fbc51e9e4373fc2be960492288.zip |
Verify function prototypes before trying to optimize functions. We also
need TargetData, just return false if we don't have it.
Update testcases accordingly.
Fixes PR6807.
llvm-svn: 101011
Diffstat (limited to 'llvm/test/Transforms/InstCombine/objsize.ll')
-rw-r--r-- | llvm/test/Transforms/InstCombine/objsize.ll | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/llvm/test/Transforms/InstCombine/objsize.ll b/llvm/test/Transforms/InstCombine/objsize.ll index d74312d2e7e..52294d80813 100644 --- a/llvm/test/Transforms/InstCombine/objsize.ll +++ b/llvm/test/Transforms/InstCombine/objsize.ll @@ -111,10 +111,10 @@ define i32 @test4() nounwind ssp { entry: %0 = alloca %struct.data, align 8 %1 = bitcast %struct.data* %0 to i8* - %2 = call i64 @llvm.objectsize.i64(i8* %1, i1 false) nounwind + %2 = call i32 @llvm.objectsize.i32(i8* %1, i1 false) nounwind ; CHECK-NOT: @llvm.objectsize -; CHECK: @llvm.memset.p0i8.i64(i8* %1, i8 0, i64 1824, i32 8, i1 false) - %3 = call i8* @__memset_chk(i8* %1, i32 0, i64 1824, i64 %2) nounwind +; CHECK: @llvm.memset.p0i8.i32(i8* %1, i8 0, i32 1824, i32 8, i1 false) + %3 = call i8* @__memset_chk(i8* %1, i32 0, i32 1824, i32 %2) nounwind ret i32 0 } @@ -149,6 +149,4 @@ declare i8* @__memset_chk(i8*, i32, i64, i64) nounwind declare noalias i8* @malloc(i32) nounwind -declare i32 @llvm.objectsize.i32(i8*, i1) nounwind readonly - -declare i64 @llvm.objectsize.i64(i8*, i1) nounwind readonly +declare i32 @llvm.objectsize.i32(i8*, i1) nounwind readonly
\ No newline at end of file |