diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2012-08-17 19:26:41 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2012-08-17 19:26:41 +0000 |
commit | 168843c0137ad67c24a3930244a9c5f60add320d (patch) | |
tree | 574e43853cce41bc60b227d2f065e39fcc023b57 /test | |
parent | 32811bef956e0fae4329e6515420d85f7e510660 (diff) | |
download | external_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.ll | 3 |
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 |