aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2012-08-17 19:26:41 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2012-08-17 19:26:41 +0000
commit168843c0137ad67c24a3930244a9c5f60add320d (patch)
tree574e43853cce41bc60b227d2f065e39fcc023b57 /test
parent32811bef956e0fae4329e6515420d85f7e510660 (diff)
downloadexternal_llvm-168843c0137ad67c24a3930244a9c5f60add320d.zip
external_llvm-168843c0137ad67c24a3930244a9c5f60add320d.tar.gz
external_llvm-168843c0137ad67c24a3930244a9c5f60add320d.tar.bz2
MemoryBuiltins: Properly guard ObjectSizeOffsetVisitor against cycles in the IR.
The previous fix only checked for simple cycles, use a set to catch longer cycles too. Drop the broken check from the ObjectSizeOffsetEvaluator. The BoundsChecking pass doesn't have to deal with invalid IR like InstCombine does. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162120 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Transforms/InstCombine/objsize.ll3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/Transforms/InstCombine/objsize.ll b/test/Transforms/InstCombine/objsize.ll
index d7e2921..31a3cb4 100644
--- a/test/Transforms/InstCombine/objsize.ll
+++ b/test/Transforms/InstCombine/objsize.ll
@@ -247,7 +247,8 @@ entry:
; technically reachable, but this malformed IR may appear as a result of constant propagation
xpto:
- %gep = getelementptr i8* %gep, i32 1
+ %gep2 = getelementptr i8* %gep, i32 1
+ %gep = getelementptr i8* %gep2, i32 1
%o = call i32 @llvm.objectsize.i32(i8* %gep, i1 true)
; CHECK: ret i32 undef
ret i32 %o