diff options
author | Eric Christopher <echristo@apple.com> | 2010-02-11 17:44:04 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2010-02-11 17:44:04 +0000 |
commit | dfdddd8ed621a44ec3da0e2fff42abf9e60e812a (patch) | |
tree | 9a5d3227f547edf61ce79d034116d7c5b196a4f3 /test/Transforms/InstCombine/objsize.ll | |
parent | ba6e033f4f2b22dce4766a55dead8385a955fd46 (diff) | |
download | llvm-dfdddd8ed621a44ec3da0e2fff42abf9e60e812a.tar.gz llvm-dfdddd8ed621a44ec3da0e2fff42abf9e60e812a.tar.bz2 llvm-dfdddd8ed621a44ec3da0e2fff42abf9e60e812a.tar.xz |
Make sure that ConstantExpr offsets also aren't off of extern
symbols.
Thanks to Duncan Sands for the testcase!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95877 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/InstCombine/objsize.ll')
-rw-r--r-- | test/Transforms/InstCombine/objsize.ll | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/objsize.ll b/test/Transforms/InstCombine/objsize.ll index 2bcdd914e3..646baa0de0 100644 --- a/test/Transforms/InstCombine/objsize.ll +++ b/test/Transforms/InstCombine/objsize.ll @@ -48,4 +48,19 @@ define i1 @baz() nounwind { ret i1 %2 } +define void @test1(i8* %q, i32 %x) nounwind noinline { +; CHECK: @test1 +; CHECK: objectsize.i32 +entry: + %0 = call i32 @llvm.objectsize.i32(i8* getelementptr inbounds ([0 x i8]* @window, i32 0, i32 10), i1 false) ; <i64> [#uses=1] + %1 = icmp eq i32 %0, -1 ; <i1> [#uses=1] + br i1 %1, label %"47", label %"46" + +"46": ; preds = %entry + unreachable + +"47": ; preds = %entry + unreachable +} + declare i32 @llvm.objectsize.i32(i8*, i1) nounwind readonly
\ No newline at end of file |