aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/InstCombine/objsize.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/InstCombine/objsize.ll')
-rw-r--r--test/Transforms/InstCombine/objsize.ll11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/objsize.ll b/test/Transforms/InstCombine/objsize.ll
index 13bb487c13..fed067c0c6 100644
--- a/test/Transforms/InstCombine/objsize.ll
+++ b/test/Transforms/InstCombine/objsize.ll
@@ -27,4 +27,15 @@ cond.false:
ret i8* %2;
}
+@window = external global [0 x i8]
+
+define i1 @baz() nounwind {
+; CHECK: @baz
+; CHECK-NEXT: llvm.objectsize.i32
+ %1 = tail call i32 @llvm.objectsize.i32(i8* getelementptr inbounds ([0 x i8]* @window, i32 0, i32 0), i1 false)
+ %2 = icmp eq i32 %1, -1
+ ret i1 %2
+}
+
+
declare i32 @llvm.objectsize.i32(i8*, i1) nounwind readonly \ No newline at end of file